Details
Description
...
@XStreamImplicit(itemFieldName="line")
ArrayList<ArrayList<Point>> lines;
...
Annotations.configureAliases(xstream, PolyLine.class); ...
throws
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
at com.thoughtworks.xstream.annotations.Annotations.getFieldParameterizedType(Annotations.java:226)
at com.thoughtworks.xstream.annotations.Annotations.configureClass(Annotations.java:161)
at com.thoughtworks.xstream.annotations.Annotations.configureAliases(Annotations.java:49)
when configureAliases() is executed.
The old code I used for 1.2.1 still works and is a viable (although ugly) workaround:
xstream.addImplicitCollection(PolyLine.class, "lines", "line", ArrayList.class); // Workaround
Commited possible solution which allows ParameterizedTypes to contain other ParameterizedTypes.