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

Improve TextField deserialization code.

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: