Re: [Simple-support] Exception when using @version on derived class (on Android)
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-08-02 09:52:12
|
I will try to recreate this in a test case, if there is a bug it will be fixed in the next release.
--- On Sat, 23/7/11, Mogens Hvidtfeldt <mo...@hv...> wrote:
> From: Mogens Hvidtfeldt <mo...@hv...>
> Subject: [Simple-support] Exception when using @version on derived class (on Android)
> To: sim...@li...
> Received: Saturday, 23 July, 2011, 11:38 AM
>
> I have a base class that is serialized (but has no version
> attribute):
>
> @Root
> public abstract class BaseLayerType implements ILayerType
> {
>
> @Element
> private Plate plate;
> .....
>
>
> And a derived class that where I have added an version
> member with the
> @Version attribute
>
> @Root
> public class PrimCollLayerType extends BaseLayerType {
>
> @Version(revision=1.1)
> private double version;
>
> @Element
> int primType =
> PrimCollLayerData.PRIMITIVE_TAG;
> ....
>
>
> This will cause following exception when I deserialize:
>
> 07-23 20:26:55.240: ERROR/ColonyCount(23073):
> java.lang.NullPointerException
> 07-23 20:26:55.240: ERROR/ColonyCount(23073):
> at
> org.simpleframework.xml.core.Composite.readVersion(Composite.java:417)
> 07-23 20:26:55.240: ERROR/ColonyCount(23073):
> at
> org.simpleframework.xml.core.Composite.read(Composite.java:366)
> 07-23 20:26:55.240: ERROR/ColonyCount(23073):
> at
> org.simpleframework.xml.core.Composite.readDefault(Composite.java:262)
>
> --
> View this message in context: http://old.nabble.com/Exception-when-using-%40version-on-derived-class-%28on-Android%29-tp32122791p32122791.html
> Sent from the Simple XML Serialization mailing list archive
> at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> BlackBerry® DevCon Americas, Oct. 18-20, San
> Francisco, CA
> The must-attend event for mobile developers. Connect with
> experts.
> Get tools for creating Super Apps. See the latest
> technologies.
> Sessions, hands-on labs, demos & much more. Register
> early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
|