Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeVariableImpl cannot be cast to java.lang.reflect.ParameterizedType (Related to Issue # 146} #174

Closed
nileshagrawal02 opened this issue Dec 18, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@nileshagrawal02
Copy link

Unable to generate the jsondoc json with latest released version 1.2.10. It happens when an object field is of collection type with generics. This seems to be related to Issue #146 but it falls on different code path.

@ApiObject
public class ClassA<T> {
...
@ApiObjectField
public List<T> objects;
...
}

Stack Trace:

Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.reflect.ParameterizedType
at org.jsondoc.springmvc.scanner.AbstractSpringJSONDocScanner.buildJSONDocObjectsCandidates(AbstractSpringJSONDocScanner.java:106)
at org.jsondoc.springmvc.scanner.AbstractSpringJSONDocScanner.jsondocObjects(AbstractSpringJSONDocScanner.java:161)
at org.jsondoc.core.scanner.AbstractJSONDocScanner.getJSONDoc(AbstractJSONDocScanner.java:96)

@pk1
Copy link

pk1 commented May 5, 2016

Same problem here with the latest version 1.2.14

@fabiomaffioletti fabiomaffioletti added this to the 1.2.16 milestone Aug 5, 2016
@fabiomaffioletti fabiomaffioletti self-assigned this Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants