Closed khaeghar closed 7 years ago
I investigated a bit the problem. The method org.toradocu.DocumentedMethod#getExecutable
fails to load the proper Java (reflection) method corresponding to a DocumentedMethod. To understand which Java method correspond to a DocumentedMethod, Toradocu checks the equality of the methods names and parameters types (the signatures).
This procedure fails when a method is a generic method, using generic type arguments, for example, <E extends T> foo(E arg0, E arg1)
. In this case, the type for a generic argument in DocumentedMethod is E
, while the type of the arguments loaded through reflection is java.lang.Object
. This difference prevents the correct identification of a Java method as the corresponding method of a DocumentedMethod.
NullPointerException at JavaElementsCollector
What was the expected outcome
Given the arguments for toradocu
The expected outcome was the .json file with the analysis for that class.
What happened instead
Toradocu broke at JavaElementsCollector with the following output
What to do to reproduce the error
Have the toradocu repository up to date, then, execute toradocu at the class Ordering.java, from the Guava library, at com/common/collect/, as specified here:
Change the route as needed.