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

Note utility of defining a serialVersionUID for classes using a serial proxy

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 12
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      As revealed in the discussion of JDK-8227368, there is utility in having serialziable classes define a serialVersionUID field even if a serial proxy is being used. While the serialVerionsUID does not come into play when *instances* of the type are serialized, it does come into play when the Class object of the serializable type is serialized.

      It would be helpful if the serialization spec explicitly noted this use-case, say in section 4.6 Stream Unique Identifiers.

        Attachments

          Activity

            People

            • Assignee:
              rriggs Roger Riggs
              Reporter:
              darcy Joe Darcy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: