You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the decompile method in Decompiler class is generating an error when processing classes with java reflection mechanism.
Below is the code to reproduce the error:
public class Reflection {
public static void staticInvokeReflection() throws NoSuchMethodException {
// Invoking static method using reflection
Method method = A.class.getMethod("staticFoo");
try {
method.invoke(null);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
The A.java file:
public class A {
public static void staticFoo() {
System.out.println("foo");
}
}
Error message:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running lang.jimple.internal.TestDecompiler
java.lang.ClassCastException: lang.jimple.internal.generated.Immediate$c_iValue cannot be cast to lang.jimple.internal.generated.Immediate$c_local
at lang.jimple.internal.Decompiler$InstructionSetVisitor.invokeMethodIns(Decompiler.java:698)
at lang.jimple.internal.Decompiler$InstructionSetVisitor.visitMethodInsn(Decompiler.java:555)
at org.objectweb.asm.tree.MethodInsnNode.accept(Unknown Source)
at org.objectweb.asm.tree.InsnList.accept(Unknown Source)
at lang.jimple.internal.Decompiler$GenerateJimpleClassVisitor.visitMethod(Decompiler.java:210)
at lang.jimple.internal.Decompiler$GenerateJimpleClassVisitor.visitEnd(Decompiler.java:162)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
The text was updated successfully, but these errors were encountered:
Hi, the decompile method in Decompiler class is generating an error when processing classes with java reflection mechanism.
Below is the code to reproduce the error:
The A.java file:
Error message:
The text was updated successfully, but these errors were encountered: