-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Marshalling 1.4.10.SP3 & 1.4.10 are calling the constructor in the parent, which sets the values in the transient fields. 2.0.5.Final is not calling the constructor resulting in the booleans default to false.
Marshalling 1.4.10.SP3 & 1.4.10
mutable_one: true mutable_two: false mutable_three: true
Marshalling 2.0.5.Final
mutable_one: false mutable_two: false mutable_three: false
public class MySerializable extends NonSerializableParent implements Serializable { private String name; public MySerializable(String name) { this.name = name; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append(String.format("name: %s\n", name)); sb.append(String.format("mutable_one: %s\n", this.is_mutable_one())); sb.append(String.format("mutable_two: %s\n", this.is_mutable_two())); sb.append(String.format("mutable_three: %s\n", this.is_mutable_three())); return sb.toString(); } } public class NonSerializableParent { private transient boolean _mutable_one; private transient boolean _mutable_two; private transient boolean _mutable_three; public NonSerializableParent() { this._mutable_one = true; this._mutable_two = false; this._mutable_three = true; } public boolean is_mutable_one() { return _mutable_one; } public void set_mutable_one(boolean _mutable_one) { this._mutable_one = _mutable_one; } public boolean is_mutable_two() { return _mutable_two; } public void set_mutable_two(boolean _mutable_two) { this._mutable_two = _mutable_two; } public boolean is_mutable_three() { return _mutable_three; } public void set_mutable_three(boolean _mutable_three) { this._mutable_three = _mutable_three; } }
- is duplicated by
-
JBMAR-223 Subtle changes in river marshaller from 1.4.12 to 2.0.x cause NPEs with Jenkins Pipeline
- Resolved
- is incorporated by
-
JBEAP-15263 [GSS](7.1.z) Default constructor of non-Serializable parent POJO is not called in deserialization process
- Closed
- relates to
-
JBMAR-181 NullPointerException while deserializing an object whose class doesn't have a no-arg constructor
- Resolved