-
Notifications
You must be signed in to change notification settings - Fork 629
Closed
Description
Hi guys,
do you know why there is SelfMethodCalls#interestingSignature method?
spotbugs/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/engine/SelfMethodCalls.java
Line 44 in d999c35
return !"()V".equals(signature); |
This ruins the correct order of method calls as derived by ClassContext#getMethodsInCallOrder -> ClassInfo#getXMethodsInCallOrder() -> SelfMethodCalls#interestingSignature
Having this example class:
public class Test {
static {
staticMethod1();
}
public static void staticMethod1(){
staticMethod2();
}
public static void staticMethod2(){
staticMethod3();
}
public static void staticMethod3(){
staticMethod4();
}
public static void staticMethod4(){
new Test().method1();
}
public void method1() {
method2();
}
public void method2() {
method3();
}
public void method3() {
method4();
}
public void method4() {
System.out.println("HERE WE GO!");
}
}
The call order is derived as:
=========
= ClassContext.getMethodsInCallOrder()
=========
staticMethod2
<init>
staticMethod1
staticMethod4
staticMethod3
method4
method3
method2
<clinit>
method1
Commenting out the private static thing then the topologically sorted call tree looks correct:
=========
= FIXED:
=========
<init>
method4
method3
method2
method1
staticMethod4
staticMethod3
staticMethod2
staticMethod1
<clinit>
Metadata
Metadata
Assignees
Labels
No labels