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

incorrect use of `@serial`

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 19
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      `@serial` is a doc comment tag that should be used on serializable fields of serializable objects, or on classes or packages to control the documentation.

      In no case is it applicable to any methods on serializable objects.

      The following instances have been observed in JDK documentation comments.

      open/src/java.desktop/share/classes/java/applet/Applet.java:111: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/Button.java:487: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/Checkbox.java:663: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java:478: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/Choice.java:711: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/Container.java:3726: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/Font.java:1944: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/Label.java:169: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/MenuComponent.java:450: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/event/FocusEvent.java:389: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/event/KeyEvent.java:2009: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.desktop/share/classes/java/awt/event/MouseEvent.java:1197: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
           * @serial
      open/src/java.base/share/classes/java/security/Provider.java:866: warning: Tag @serial cannot be used in method documentation. It can only be used in the following types of documentation: package, class/interface, field.
          * @serial

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jjg Jonathan Gibbons
              Reporter:
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: