Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8142544

Improve TextField deserialization code.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • client-libs
    • 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.

            arapte Ambarish Rapte
            arapte Ambarish Rapte
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: