Exclude main methods from models

This commit is contained in:
Benjamin Muskalla
2022-01-19 16:02:29 +01:00
parent 7e3f3c6e2a
commit 25d251c24f
2 changed files with 6 additions and 1 deletions

View File

@@ -29,7 +29,8 @@ private string isExtensible(RefType ref) {
predicate isRelevantForModels(Callable api) {
not isInTestFile(api.getCompilationUnit().getFile()) and
not isJdkInternal(api.getCompilationUnit())
not isJdkInternal(api.getCompilationUnit()) and
not api instanceof MainMethod
}
private predicate isInTestFile(File file) {

View File

@@ -21,4 +21,8 @@ public class Sinks {
}
}
public static void main(String[] args) throws IOException {
String foo = new Sinks().readUrl(new URL(args[0]), Charset.defaultCharset());
}
}