Suppress deprecated import warning in Java

To avoid the warning: do not import the class

instead use the fully qualified class name

and use it in as few locations as possible.


Use this annotation on your class or method:

@SuppressWarnings( "deprecation" )

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.