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

ObjectOutputStream.putFields() should clarify behaviour of multiple calls

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 8, 9
    • core-libs

      The specification for putFields is as follows:

        "Retrieve the object used to buffer persistent fields to be written to the
         stream. The fields will be written to the stream when writeFields method
         is called.
         Returns: an instance of the class Putfield that holds the serializable fields"

      It is ambiguous as to whether the same instance is returned for multiple calls.

      The current implementation of putFields in ObjectOutputStream returns the same instance for multiple calls.

            chegar Chris Hegarty
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: