In Java, if you import a deprecated class:
import SomeDeprecatedClass;
You get this warning: The type SomeDeprecatedClass is deprecated
Is there a way to suppress this warning?
In Java, if you import a deprecated class:
import SomeDeprecatedClass;
You get this warning: The type SomeDeprecatedClass is deprecated
Is there a way to suppress this warning?
Try using the following command-line switch when compiling:
-Xlint:-deprecation
the -Xlint switch lets you specify what warnings should be checked, prefacing one with a -
explicitly disables it.
As a hack you can not do the import and use the fully qualified name inside the code.
You might also try javac -Xlint:-deprecation not sure if that would address it.
Use this annotation on your class or method:
@SuppressWarnings( "deprecation" )