Skip to content

Commit 97b13df

Browse files
committed
Make SOOT not crash on JVMs newer than version 8.
Stop trying to access system properties "sun.boo.class.path" and "java.ext.dirs" which got removed from those never versions. For our usecase those classes are not need since we anyway model library methods via policies.
1 parent 250ff9a commit 97b13df

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

generated/jastadd/soot/JastAddJ/Program.java

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -329,24 +329,18 @@ public void initPaths() {
329329
ArrayList classPaths = new ArrayList();
330330
ArrayList sourcePaths = new ArrayList();
331331

332-
String[] bootclasspaths;
333-
if(options().hasValueForOption("-bootclasspath"))
334-
bootclasspaths = options().getValueForOption("-bootclasspath").split(File.pathSeparator);
335-
else
336-
bootclasspaths = System.getProperty("sun.boot.class.path").split(File.pathSeparator);
337-
for(int i = 0; i < bootclasspaths.length; i++) {
338-
classPaths.add(bootclasspaths[i]);
339-
//System.err.println("Adding classpath " + bootclasspaths[i]);
332+
if(options().hasValueForOption("-bootclasspath")) {
333+
String[] bootclasspaths = options().getValueForOption("-bootclasspath").split(File.pathSeparator);
334+
for(int i = 0; i < bootclasspaths.length; i++) {
335+
classPaths.add(bootclasspaths[i]);
336+
}
340337
}
341-
342-
String[] extdirs;
343-
if(options().hasValueForOption("-extdirs"))
344-
extdirs = options().getValueForOption("-extdirs").split(File.pathSeparator);
345-
else
346-
extdirs = System.getProperty("java.ext.dirs").split(File.pathSeparator);
347-
for(int i = 0; i < extdirs.length; i++) {
348-
classPaths.add(extdirs[i]);
349-
//System.err.println("Adding classpath " + extdirs[i]);
338+
339+
if(options().hasValueForOption("-extdirs")) {
340+
String[] extdirs = options().getValueForOption("-extdirs").split(File.pathSeparator);
341+
for(int i = 0; i < extdirs.length; i++) {
342+
classPaths.add(extdirs[i]);
343+
}
350344
}
351345

352346
String[] userClasses = null;

0 commit comments

Comments
 (0)