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

Remove misleading serialVersionUID from JulienFields.Field

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • Verification:
      Not verified

      Description

      The nested enum java.time.temporal.JulianFields.Field declare a serialVersionUID field. Per the serialization spec, a serialVersionUID field in an enum is ignored.

      "The process by which enum constants are serialized cannot be customized: any class-specific writeObject, readObject, readObjectNoData, writeReplace, and readResolve methods defined by enum types are ignored during serialization and deserialization. Similarly, any serialPersistentFields or serialVersionUID field declarations are also ignored--all enum types have a fixed serialVersionUID of 0L. Documenting serializable fields and data for enum types is unnecessary, since there is no variation in the type of data sent."
      https://docs.oracle.com/javase/10/docs/specs/serialization/serial-arch.html#serialization-of-enum-constants

      Therefore, this misleading field should be deleted.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: