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

javac gives warnings on import of deprecated items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • tbd
    • 9
    • tools
    • None

      In the course of trying to deprecate the old javadoc API, I came across the following unsuppressible warnings for importing deprecated items.

      Compiling 437 files for jdk.javadoc
      /w/jjg/work/dev.8157606.deprecate.old.javadoc.api/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java:39: warning: [deprecation] AnnotationDesc in com.sun.javadoc has been deprecated
      import com.sun.javadoc.AnnotationDesc.ElementValuePair;
                            ^
      /w/jjg/work/dev.8157606.deprecate.old.javadoc.api/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/DocletInvoker.java:48: warning: [deprecation] LanguageVersion in com.sun.javadoc has been deprecated
      import static com.sun.javadoc.LanguageVersion.*;
                                   ^
      error: warnings found and -Werror specified
      1 error
      2 warnings


      The items are notable for being nested items, not top-level items.

      Also, since the references are in imports, they are not under the implicit suppression of being in a class which is itself being deprecated.

            jlahoda Jan Lahoda
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: