Hi Dmitry,

[email protected] wrote:

> Hi,
> 
> When CollectionConverter is used with the @XStreamConverter annotation,
> the converter is set up so that it will only accept the TreeMap collection
> type.

?? Sorry, I don't understand, what you try to tell me here.

> This is an odd behavior! Is there any way to suppress this
> initialization (CollectionConverter has a constructor that doesn't limit
> it to just one particular type), or to specify some other type, such as
> ArrayList?
> 
> public class ItemList {
>     @XStreamConverter(value = CollectionConverter.class)
>     public List<String> items;
> }

I don't understand this example either. You setup an own CollectionConverter 
for the list, but that's the default anyway.


> 
> As a workaround, I subclassed CollectionConverter:
> 
> public class ItemList {
>     @XStreamConverter(value = ListCollectionConverter.class)
>     public List<String> items;
> 
>     public static class ListCollectionConverter extends
>     CollectionConverter {
>         public ListCollectionConverter(Mapper mapper) {
>             super(mapper);
>         }
>     }
> }
> 
> This did the trick, but it is very counterintuitive.

Where's the difference?

Maybe you tell me first, what you actually try to accomplish...

- Jörg


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

    http://xircles.codehaus.org/manage_email


Reply via email to