[Simple-support] Exception when using @version on derived class (on Android)
Brought to you by:
niallg
|
From: Mogens H. <mo...@hv...> - 2011-07-23 18:38:46
|
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.
|