Hi Gabriel,

Gabriel Rossetti wrote:

> Hi all,
> 
> I have an issue un-serializing a class with a generic type. Here is an
> example:
> 
> public abstract class Message<T> {
> 
>   protected T data;
>   // getters and setters
> }
> 
> public class StringListMessage extends Message <List<String> > {
> 
>   protected T data;
>   // getters and setters
> }
> 
> For example. I am using addImplicitCollection like this:
> 
> xstream.addImplicitCollection(StringListMessage.class, "data");
> 
> get the following error:
> 
> Field "data" declares no collection or array
> 
> I can't find anything online about this.

the case is simply not supported. However, IIRC it is possible to get the 
bounded type at runtime (currently it simply detects "Object"). Please open 
a JIRA issue.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to