Im trying to get control flow graph of methods of my code . It working fine for all methods until I ask it to analyse a method which has lambda expression like the below one.
public void test()
{
List<String> test = new ArrayList<String>();
test.forEach((action)->{
System.out.println(action);
});
}
The exception Im getting while I try to invoke Body body = method.retrieveActiveBody();
is
java.lang.RuntimeException: Failed to convert <combin.Line: void test()>
at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2040)
at soot.SootMethod.retrieveActiveBody(SootMethod.java:402)
Caused by: java.lang.RuntimeException: No method java.lang.Boolean valueOf(boolean) in class java.lang.Boolean
at soot.SootClass.getMethod(SootClass.java:412)
at soot.LambdaMetaFactory$Wrapper.<init>(LambdaMetaFactory.java:285)
at soot.LambdaMetaFactory.<init>(LambdaMetaFactory.java:63)
at soot.Singletons.soot_LambdaMetaFactory(Singletons.java:2408)
at soot.LambdaMetaFactory.v(LambdaMetaFactory.java:67)
at soot.asm.AsmMethodSource.convertInvokeDynamicInsn(AsmMethodSource.java:1420)
at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1791)
at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2038)
... 8 more
The soot version Im using is
compile group:'ca.mcgill.sable', name: 'soot' , version:'3.3.0'