Name: pa48320 Date: 08/08/2002
If you compile a bunch on files at the same time and one containes the @deprecated tag and another uses that method, you will not get the deprecated warning. Consider the following two classes:
package com.test;
public class test1
{
/**
* @deprecated
*/
public void method1()
{
System.out.println("method1");
}
}
package com.test;
public class test2
{
public void method2()
{
test1 t = new test1();
t.method1();
}
}
Compile them using javac *.java. You get no warnings. Modify test2 and recompile just test2.java. You will get the deprecated warnings.
======================================================================
- duplicates
-
JDK-4216683 Inconvenient javac deprecation warning suppression
-
- Closed
-