Skip to content

Commit 195949a

Browse files
committed
Fix searching for static methods
1 parent bb106d5 commit 195949a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

soot-infoflow/src/soot/jimple/infoflow/util/SootUtils.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ public static List<Value> getUseAndDefValues(Unit u) {
4444
*/
4545
public static SootMethod findMethod(SootClass currentClass, String subsignature) {
4646
Scene sc = Scene.v();
47-
return sc.getOrMakeFastHierarchy().resolveMethod(currentClass,
47+
SootMethod m = sc.getOrMakeFastHierarchy().resolveMethod(currentClass,
4848
sc.makeMethodRef(currentClass, subsignature, false), true);
49+
if (m == null) {
50+
//maybe the method is static
51+
m = currentClass.getMethodUnsafe(subsignature);
52+
}
53+
return m;
4954
}
5055

5156
}

0 commit comments

Comments
 (0)