Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Not A Bug
-
Affects Version/s: 1.4.6
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
Description
Ex :
public abstract class A
public class B extends A
{ ... }If I omit id in serialization of class B like this :
xStream.omitField(B.class, "id");
It doesn't work, XStream still serializes "id".
This behavior is by design. You have to provide the declaring type. This is explicitly stated in the Javadocs to XStream.omitField.