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

Doclet API: Need serialVersionUID to be included in Serialized Form page

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.2.0
    • tools
    • None

      The serialVersionUID should be in the Serialized Form generated by
      javadoc standard doclet.

      The following method is missing from javadoc.ClassDoc.

        /**
         * Returns the serialVersionUID for the class represented by ClassDoc.
         * The serialVersionUID is 0L if the class is not Serializable.
         */
        long serialVersionUID();

      This capability was not originally implemented due to the complexity involved
      in computing the serialVersionUID. The serialVersionUID is simply the
      the special static final member serialVersionUID OR it is computed based on
      a complex hash including the signatures of almost all the members of the
      class. (Actual computation is in java.io.ObjectStreamClass.computeSerialVersionUID() and it is described
      in the Object Serialization Specification.)

      Initial attempts to access the static final member serialVersIonUID within
      javadoc context were not successful in accessing the value of the static final member serialVersionUID. There exists a chance that the static final members
      are not initialized yet in the stage of compilation that javadoc has completed.

      This bug report is a record that this feature was not implemented originally.

            gafter Neal Gafter (Inactive)
            jfialli Joe Fialli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: