|
|
|
[
Permlink
| « Hide
]
Guilherme Silveira - 01/Jun/07 08:56 PM
Commited possible solution which allows ParameterizedTypes to contain other ParameterizedTypes.
Set resolution to fixed, still waiting for Klaus' comment and closing of the issue ...
This fix probably also fixes my issue, but I wanted to let you know anyway, so you can test it.
The problem Klaus is referring to also comes up when you use the @XStreamContainedType annotation on a type where the parameter type is also a parameterized type: @XStreamContainedType() public List<List<CarModel>> carModels = new ArrayList<List<CarModel>>(); Here's the exception: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class at com.thoughtworks.xstream.annotations.Annotations.configureParameterizedTypes(Annotations.java:249) at com.thoughtworks.xstream.annotations.Annotations.configureClass(Annotations.java:132) at com.thoughtworks.xstream.annotations.Annotations.configureAliases(Annotations.java:49) Also, I was wondering if the fix actually looked at contained types in contained types, or if it is just a superficial fix. For instance, in my example, if I had an alias defined for CarModel, would the alias be registered or not? I think it should be. I couldn't get a 'lastest snapshot' from your repository, the links on this page don't work: http://xstream.codehaus.org/download.html How do I get a recent snapshot? Thanks, Paul |
|||||||||||||||||||||||||||||||||||||||||