comparison jvmci/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIClassLoaderFactory.java @ 23700:9e1235406b59

[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
author Doug Simon <doug.simon@oracle.com>
date Sat, 18 Jun 2016 13:19:01 +0200
parents f84a5ac3be22
children 450e0bafd83d
comparison
equal deleted inserted replaced
23699:8f9709f61cd4 23700:9e1235406b59
67 */ 67 */
68 private static URL[] getJVMCIJarsUrls() { 68 private static URL[] getJVMCIJarsUrls() {
69 File javaHome = new File(System.getProperty("java.home")); 69 File javaHome = new File(System.getProperty("java.home"));
70 File lib = new File(javaHome, "lib"); 70 File lib = new File(javaHome, "lib");
71 File jvmci = new File(lib, "jvmci"); 71 File jvmci = new File(lib, "jvmci");
72 if (!jvmci.exists()) { 72 if (!jvmci.isDirectory()) {
73 throw new InternalError(jvmci + " does not exist"); 73 throw new InternalError(jvmci + " does not exist or is not a directory");
74 } 74 }
75 75
76 List<URL> urls = new ArrayList<>(); 76 List<URL> urls = new ArrayList<>();
77 for (String fileName : jvmci.list()) { 77 for (String fileName : jvmci.list()) {
78 if (fileName.endsWith(".jar")) { 78 if (fileName.endsWith(".jar")) {