Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.
[error] (run-main-1) java.lang.NullPointerException
[error] java.lang.NullPointerException
[error] at spoon.support.reflect.reference.CtTypeParameterReferenceImpl.getDeclaration(CtTypeParameterReferenceImpl.java:131)
[error] at spoon.support.reflect.reference.CtTypeParameterReferenceImpl.isGenerics(CtTypeParameterReferenceImpl.java:195)
[error] at spoon.support.reflect.reference.CtTypeReferenceImpl.isGenerics(CtTypeReferenceImpl.java:845)
[error] at org.deepanalyzer.javaparse.Parser.extractType(Parser.scala:546)
[error] at org.deepanalyzer.javaparse.Parser.descendExpression(Parser.scala:951)
i have reproduce your bug, currently looking into it.
Edit: The problem is, that if (!parentExec.getDeclaringType().equals(e)) getDeclaringType returns null
Hi,
I have an error parsing this file (This codebase leverage several bugs, you should use it) after L87 of this file : https://github.com/metasfresh/metasfresh/blob/70a820840dde9b73783c52ec72e02c9f611df281/de.metas.adempiere.libero.libero/src/main/java/org/eevolution/costing/BOMCostPrice.java#L87 It's the last reference I have on this file. My code test before calling isGeneric that the receiver is not null. The last token that lead to call isGeneric is a CtInvocation
Here's the stacktrace :