< prev index next >

test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/ClassPathDirEntry.java

Print this page
rev 47464 : 8186618: [TESTBUG] Test applications/ctw/Modules.java doesn't have timeout and hang on windows
Reviewed-by: duke

@@ -21,11 +21,10 @@
  * questions.
  */
 
 package sun.hotspot.tools.ctw;
 
-
 import java.io.IOException;
 import java.nio.file.FileVisitOption;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.stream.Stream;

@@ -65,12 +64,11 @@
     protected byte[] findByteCode(String classname) {
         Path path = root;
         for (String c : Utils.classNameToFileName(classname).split("/")) {
             path = path.resolve(c);
         }
-        if (!path.toFile()
-                 .exists()) {
+        if (!Files.exists(path)) {
             return null;
         }
         try {
             return Files.readAllBytes(path);
         } catch (IOException e) {
< prev index next >