Be more robust to broken java_runtime_dir
If java_runtime_dir in wala.properties is invalid, fall back to the boot class path instead of just failing.
This commit is contained in:
parent
46a483f320
commit
e95663e24a
|
@ -59,7 +59,10 @@ public final class WalaProperties {
|
|||
}
|
||||
|
||||
String dir = p.getProperty(WalaProperties.J2SE_DIR);
|
||||
Assertions.productionAssertion(dir != null);
|
||||
if (dir == null || !(new File(dir)).isDirectory()) {
|
||||
System.err.println("WARNING: java_runtime_dir " + dir + " in wala.properties is invalid. Using boot class path instead.");
|
||||
return PlatformUtil.getBootClassPathJars();
|
||||
}
|
||||
return getJarsInDirectory(dir);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue