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

EnumSet serial form documentation is deficient

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 6, 7, 8
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
      None

      Description

      The java.util.EnumSet class is serializable. It uses the serialization proxy pattern, so if an EnumSet instance is serialized, a serialized instance of EnumSet.SerializationProxy is emitted to the serialized bytestream. Serialized instances of actual EnumSets never occur in a normal serialized bytestream, and if someone were to concoct one and deserialize it, EnumSet prevents it from being deserialized.

      EnumSet has "@serial exclude" in its javadoc, so no link to the Serialized Form html page exists. However, there is an "orphan" entry for EnumSet.SerializationProxy on the serialized form page, and it describes reasonably accurately what is actually serialized. Unfortunately there is no connection between the EnumSet javadoc specification and the EnumSet.SerializationProxy serialized form.

      This needs to be fixed, and a convention established for how a logical linkage ought to be established between a class and its serialization proxy. Enhancements to javadoc in support of this should also be considered.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                smarks Stuart Marks
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: