-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
-
generic
-
generic
While deserialization TextField class object,
"text" variable from the input stream using defaultReadObjet() at TextComponent::readObject().
Then TextField::readObject() does the post validation on the variable and updates the variable "text".
For a fraction of time, the "text" variable might contain an inconsistent value.
So, instead of using defaultReadObject(), member fields should be read individually using,
ObjectInputStream.GetField fields = s.readFields();
The variable "text" should be updated only with correct value after validation.
"text" variable from the input stream using defaultReadObjet() at TextComponent::readObject().
Then TextField::readObject() does the post validation on the variable and updates the variable "text".
For a fraction of time, the "text" variable might contain an inconsistent value.
So, instead of using defaultReadObject(), member fields should be read individually using,
ObjectInputStream.GetField fields = s.readFields();
The variable "text" should be updated only with correct value after validation.
- relates to
-
JDK-8055197 TextField deletes multiline strings
- Resolved