cobigen icon indicating copy to clipboard operation
cobigen copied to clipboard

Generic types loose their parameter type

Open maybeec opened this issue 10 years ago • 3 comments

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!

maybeec avatar Jan 15 '15 16:01 maybeec

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.

maybeec avatar Jan 25 '15 22:01 maybeec

The one who tries to find a solution for that should try this experimentally on an own fork.

maybeec avatar Mar 04 '15 13:03 maybeec

Stale topic. Please negotiate closing or discussing the relevance of this ticket.

github-actions[bot] avatar Sep 16 '19 00:09 github-actions[bot]