Details
-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b108
-
generic, x86
-
generic, windows_xp
Description
@Deprecated
public class TraceImplementation implements TraceDestination {...}
The TraceDestination class is deprecated, but so is TraceImplementation so the warning is unreasonable. Even adding @SuppressWarnings("deprecation") on the class will not shut it up.
A further problem with deprecation is that import statements that import a deprecated class generate warnings. Since you cannot annotate an import, you cannot say that these warnings are unnecessary. It seems that the warning should happen when the deprecated class is used within the compilation unit, not when it is imported.
Attachments
Issue Links
- duplicates
-
JDK-7117383 SuppressWarnings("deprecation") does not suppress warnings when it should
- Resolved
-
JDK-8022474 @SuppressWarnings("deprecation") Doesn't Work As Expected
- Resolved
- relates to
-
JDK-6460147 @SuppressWarnings("deprecation") does not work on fields
- Resolved
-
JDK-6480612 Fix -Xlint warnings
- Closed
-
JDK-6460147 @SuppressWarnings("deprecation") does not work on fields
- Resolved
-
JDK-6729835 Deprecated flag before import or package is not processed properly
- Resolved
-
JDK-6381698 Warn of decommissioning of apt
- Closed
-
JDK-6598104 javac should not warn about imports of deprecated classes
- Closed