-
Bug
-
Resolution: Fixed
-
P4
-
8
-
b04
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8064050 | 8u45 | Jan Lahoda | P4 | Resolved | Fixed | b01 |
JDK-8056020 | 8u40 | Jan Lahoda | P4 | Resolved | Fixed | b04 |
JDK-8070270 | emb-8u47 | Jan Lahoda | P4 | Resolved | Fixed | team |
Consider this example:
-----
public class Depr implements Intf {
@SuppressWarnings("deprecation")
public void test() { }
}
interface Intf {
@Deprecated void test();
}
-----
Running with -Xlint:deprecation produces this:
-----
$ javac -Xlint:deprecation Depr.java
Depr.java:3: warning: [deprecation] test() in Intf has been deprecated
public void test() { }
^
1 warning
-----
While the warning should probably be suppressed by the @SuppessWarnings annotation.
This can be reproduced with:
-----
$ javac -fullversion
javac full version "1.8.0-ea-b121"
-----
See original bugreport:
https://netbeans.org/bugzilla/show_bug.cgi?id=241275
-----
public class Depr implements Intf {
@SuppressWarnings("deprecation")
public void test() { }
}
interface Intf {
@Deprecated void test();
}
-----
Running with -Xlint:deprecation produces this:
-----
$ javac -Xlint:deprecation Depr.java
Depr.java:3: warning: [deprecation] test() in Intf has been deprecated
public void test() { }
^
1 warning
-----
While the warning should probably be suppressed by the @SuppessWarnings annotation.
This can be reproduced with:
-----
$ javac -fullversion
javac full version "1.8.0-ea-b121"
-----
See original bugreport:
https://netbeans.org/bugzilla/show_bug.cgi?id=241275
- backported by
-
JDK-8056020 @SuppressWarnings("deprecation") does not work when overriding deprecated method
- Resolved
-
JDK-8064050 @SuppressWarnings("deprecation") does not work when overriding deprecated method
- Resolved
-
JDK-8070270 @SuppressWarnings("deprecation") does not work when overriding deprecated method
- Resolved
- relates to
-
JDK-8032211 Don't issue deprecation warnings on import statements
- Closed