JDK-8157773 : javac gives warnings on import of deprecated items
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-05-24
  • Updated: 2021-03-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_minorUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.
Comments
See work in JDK-8032211 and JDK-8042566.
25-05-2016