Hi,

[email protected] wrote:

> Hello,
> 
> I have a problem with XStreamImplicit annotations in derived classes. It
> seems that an @XStreamImplicit annotation in a subclass screens all
> @XStreamImplicit annotations in its superclass.
> 
> Example 1:
> 
> public class SuperClass {
> @XStreamImplicit(itemFieldName="superItem")
> private List<String> superList;
> }
> 
> public class SubClass extends SuperClass {
> private List<String> subList;
> }
> 
> <SubClass>
>     <superItem>A</superItem>
>     <superItem>B</superItem>
>     <subList class="java.util.Arrays$ArrayList">
>       <a class="string-array">
>         <string>a</string>
>         <string>b</string>
>       </a>
>     </subList>
> </SubClass>
> 
> - this works.
> 
> Example 2:
> 
> public class SuperClass {
> @XStreamImplicit(itemFieldName="superItem")
> private List<String> superList;
> }
> 
> public class SubClass extends SuperClass {
> @XStreamImplicit(itemFieldName="subItem")
> private List<String> subList;
> }
> 
> <SubClass>
>     <superItem>A</superItem>
>     <superItem>B</superItem>
>     <subItem>a</subItem>
>     <subItem>b</subItem>
> </SubClass>
> 
> - this will trigger an exception, because superItem will not be recognized
> (no mapping for this annotation).
> 
> XStream v. 1.4.1

Please give the latest SNAPSHOT a try and report back. You might have hit 
XSTR-733.

- Jörg


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

    http://xircles.codehaus.org/manage_email


Reply via email to