Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ private static Collection<String> extractMethodModifiers(
"Invalid access modifiers method[" + methodNode.name + methodNode.desc + "]: " + bit);
}
}
// if class is an interface && method as code this is a default method
if ((classNode.access & Opcodes.ACC_INTERFACE) > 0 && methodNode.instructions.size() > 0) {
// if class is an interface && method has code && non-static this is a default method
if ((classNode.access & Opcodes.ACC_INTERFACE) > 0
&& methodNode.instructions.size() > 0
&& (methodNode.access & Opcodes.ACC_STATIC) == 0) {
results.add("default");
}
return results;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ public void symbolExtraction14() throws IOException, URISyntaxException {
null,
null,
Void.TYPE.getTypeName());
Scope m4MethodScope = i1ClassScope.getScopes().get(1);
assertLangSpecifics(
m4MethodScope.getLanguageSpecifics(),
asList("public", "static"),
null,
null,
null,
String.class.getTypeName());
Scope myEnumClassScope = symbolSinkMock.jarScopes.get(3).getScopes().get(0);
assertLangSpecifics(
myEnumClassScope.getLanguageSpecifics(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ private strictfp synchronized final String m2(String... strVarArgs) {

interface I1 {
default void m3(){}
static String m4(String arg){
return arg;
}
}

interface I2 {
Expand Down
Loading