Enhanced deprecation [JEP-277]

There are two facilities for expressing deprecation:

  • @Deprecated annotation
  • @deprecated javadoc tag

These facilities were introduced in Java SE 5 and JDK 1.1, respectively. The @Deprecated annotation was intended to annotate program components that should not be used because they were deemed dangerous and/or there was a better option. That was the intended use. Actual use varied including and because warnings were only provided at compile time; there was little reason to ignore the annotated code.

The Enhanced Deprecation JEP-277 was taken on to provide developers with clearer information regarding the intended disposition of the APIs in the specification documentation. Work on this JEP also resulted in a ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.