more exclusions

allow 1.8 libs
This commit is contained in:
Julian Dolby 2015-06-04 15:51:46 -04:00
parent 58b7c7324c
commit 31f9f1b0b5
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,5 @@
apple\/.*
com\/apple\/.*
java\/awt\/.*
javax\/swing\/.*
sun\/awt\/.*
@ -10,4 +12,7 @@ com\/ibm\/crypto\/.*
com\/ibm\/security\/.*
org\/apache\/xerces\/.*
dalvik\/.*
java\/io\/ObjectStreamClass*
java\/io\/ObjectStreamClass*
jdk\/.*
org\/omg\/.*
org\/w3c\/.*

View File

@ -36,7 +36,7 @@ public class LibraryVersionTest extends WalaTestCase {
@Test public void testLibraryVersion() throws IOException {
AnalysisScope scope = AnalysisScopeReader.readJavaScope(TestConstants.WALA_TESTDATA, (new FileProvider()).getFile("J2SEClassHierarchyExclusions.txt"), MY_CLASSLOADER);
System.err.println("java library version is " + scope.getJavaLibraryVersion());
Assert.assertTrue(scope.isJava17Libraries() || scope.isJava16Libraries() || scope.isJava15Libraries()||scope.isJava14Libraries());
Assert.assertTrue(scope.isJava18Libraries() || scope.isJava17Libraries() || scope.isJava16Libraries() || scope.isJava15Libraries()||scope.isJava14Libraries());
}
}

View File

@ -411,6 +411,10 @@ public class AnalysisScope {
}
}
public boolean isJava18Libraries() throws IllegalStateException {
return getJavaLibraryVersion().startsWith("1.8");
}
public boolean isJava17Libraries() throws IllegalStateException {
return getJavaLibraryVersion().startsWith("1.7");
}