jdk-24/langtools/test/tools/javac/warnings/suppress/Overridden.java
Jan Lahoda c0d767f6f1 8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
When the overrides deprecated method warning is being reported, need to do that in the lint context of the method.

Reviewed-by: vromero
2014-02-07 21:43:33 +01:00

17 lines
447 B
Java

/**
* @test /nodynamiccopyright/
* @bug 8033421
* @summary Check that \\@SuppressWarnings works properly when overriding deprecated method.
* @build VerifySuppressWarnings
* @compile/ref=Overridden.out -XDrawDiagnostics -Xlint:deprecation Overridden.java
* @run main VerifySuppressWarnings Overridden.java
*/
public class Overridden implements Interface {
public void test() { }
}
interface Interface {
@Deprecated void test();
}