Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-6481080

(ann) @Deprecated annotation has no effect on packages

    XMLWordPrintable

Details

    • minimal
    • Documenting long-standing behavior.
    • Java API, Language construct
    • SE

    Description

      Summary

      Document in the JLS and libraries specification that a Deprecated annotation does not have an effect on packages.

      Problem

      An @Deprecated annotation can be applied to packages, but has no effect there. (Likewise, an @Deprecated annotation has no effect if applied to a local variable or parameter.)

      Solution

      Update the JLS to state the @Deprecate on a package is a no-op and make analogous changes in the javadoc for java.lang.Deprecated.

      Specification

      JLS 9.6.4.6

      Change

      "Use of the @Deprecated annotation on a local variable declaration or on a parameter declaration has no effect."

      to

      "Use of the @Deprecated annotation on a local variable declaration or on a parameter declaration or on a package declaration has no effect."

      Analogous change in java.lang.Deprecated:

      + * <p> Use of the @Deprecated annotation on a local variable declaration or
      + * on a parameter declaration *or on a package declaration* has no effect.
      + *

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              darcy Joe Darcy
              Alex Buckley
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: