Closed slimming-fat closed 2 months ago
Which version and configuration did you use?
Which version and configuration did you use?
Thank you, I found the reason. The bytecode after compilation looks like this, which is why there are no throw statements in Jimple.
public static void main(String[] args) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
Class appClass = ReflectionTest.class;
Object appObj = appClass.newInstance();
Method method1 = appClass.getDeclaredMethod("foo");
method1.invoke(appObj);
bar();
}
I use method
sootMethod.getBody().getStmts()
to obtain jimple,there are no throw statements(new RuntimeException(e)
) in Jimple. Demo code:Jimple: