cobigen
cobigen copied to clipboard
Generic types loose their parameter type
Using the testdata builder, I currently observe that the type parameters of generic types are lost in the generated code. So when generating a testdata builder from the field
private List<String> stringList;
you will get a method like this:
public Builder stringList(List<?> stringList) { ... }
The parameter type should be preserved!
This behavior occurs, when considering inherited fields, which have been retrieved by reflection.
Thus this issue is partially invalid, but we might try to improve this by providing more parsed java classes via the eclipse before passing the input JavaClass
to generation.
The one who tries to find a solution for that should try this experimentally on an own fork.
Stale topic. Please negotiate closing or discussing the relevance of this ticket.