Seeing something weird with invokestatic methods on non static methods?

This commit is contained in:
Adam
2015-07-26 21:36:19 -04:00
parent 35fcfc0645
commit fda37792ff
3 changed files with 18 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ public class UnusedParameters implements Deobfuscator
visited.add(cf);
Method method = cf.findMethodDeep(nat); // XXX this searches down
Method method = cf.findMethod(nat);
if (method != null && !method.isStatic())
list.add(method);
@@ -55,10 +55,7 @@ public class UnusedParameters implements Deobfuscator
private static List<Method> findDependentMethods(Method m)
{
ClassFile cf = m.getMethods().getClassFile();
List<Method> methods = findDependentMethods(m.getNameAndType(), new HashSet<ClassFile>(), cf.getGroup(), cf);
Set s = new HashSet<>(methods); // XXX
return new ArrayList<>(s);
return findDependentMethods(m.getNameAndType(), new HashSet<ClassFile>(), cf.getGroup(), cf);
}
private List<Integer> findUnusedParameters(Method method)