Why isn't the @Deprecated annotation triggering a compiler warning about a method?
- by Scooter
I am trying to use the @Deprecated annotation. The @Deprecated documentation says that: "Compilers warn when a deprecated program element is used or overridden in non-deprecated code". I would think this should trigger it, but it did not. javac version 1.7.0_09 and compiled using and not using -Xlint and
-deprecation.
public class test_annotations {
public static void main(String[] args)
{
test_annotations theApp = new test_annotations();
theApp.this_is_deprecated();
}
@Deprecated
public void this_is_deprecated()
{
System.out.println("doing it the old way");
}
}