changeset 29:699dff9a1eeb

CODETOOLS-7902108 Report generation for the JDK sources
author afedorch
date Wed, 24 Jan 2018 18:28:09 +0300
parents 4cfae0867822
children d9269c28de65
files src/classes/com/sun/tdk/jcov/report/ClassCoverage.java
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/classes/com/sun/tdk/jcov/report/ClassCoverage.java	Thu Dec 21 17:21:38 2017 -0800
+++ b/src/classes/com/sun/tdk/jcov/report/ClassCoverage.java	Wed Jan 24 18:28:09 2018 +0300
@@ -504,9 +504,16 @@
                 return f.getAbsolutePath();
             }
             else{
-                if (clz.getModuleName() != null && source_paths[i].contains("#module")){
-                    f = new File(source_paths[i].replaceAll("\\#module",clz.getModuleName()) + source_name);
-                    if (f.exists()){
+                if (clz.getModuleName() != null) {
+                    if (source_paths[i].contains("#module")) {
+                        f = new File(source_paths[i].replaceAll("\\#module", clz.getModuleName()) + source_name);
+                        if (f.exists()) {
+                            return f.getAbsolutePath();
+                        }
+                    }
+
+                    f = new File(source_paths[i].concat(clz.getModuleName()).concat(String.valueOf(sep)).concat(source_name));
+                    if (f.exists()) {
                         return f.getAbsolutePath();
                     }
                 }