JDK-5093875 : Propose mechanism for removing deprecated methods/classes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2004-08-30
  • Updated: 2017-06-03
  • Resolved: 2017-06-03

Name: rmT116609			Date: 08/29/2004

Sun should propose a mechanism whereby deprecated methods, classes could be removed from standard JRE distribution. Backwards compatibility could be maintained by providing a "backwards compatibility JAR", one per JRE release. When running any software that does not make use of deprecated methods/classes, it would run "out of the box" using the standard distribution. When running older softwaer that makes use of deprecated methods/classes, the user would have to add the "backwards compatibility JAR" into the boot classpath, before the standard JARs, in order to override the official release.

Also, the standard online Javadoc should not include any deprecated methods/classes that have been removed in the standard  distirbution. There would be two types of deprecated methods/classes:

1) Deprecated but shipped with the standard release
2) Deprecated and not part of the standard release

Ideally you would remove deprecated items after X months/years and have it coincide with major revision updates.

If Sun feels they do not wish to over remove deprecated methods/classes, please leave this issue open in order to gauge community-interest in the form of votes.

1) There is a general consensus that  the Core JARs are simply getting too big for distribution. The JRE size has been growing in an alarming rate.

2) The online Javadoc is getting too cluttered

3) Interfaces with deprecated methods led to a waste of time whereby implementors must implement methods that never get used
(Incident Review ID: 301272) 

New deprecation mechanisms are covered by JEP 277: http://openjdk.java.net/jeps/277 Closing as Not an Issue.

EVALUATION Deprecation indicates that we recommend that the API not be used. It does not actually restrict or prevent its use. Until we have a guarantee that a particular deprecated API is no longer used, it is unlikely that we will ever be able to completely remove it. Even if we could remove everything that's deprecated, doing so would not appreciably reduce the size of the JRE. We are looking into providing views into the JDK javadoc which would allow a user to see APIs based on user expertise (e.g. novice vs. expert user). It is conceivable that we would decide to include deprecated API only if explicitly requested. -- iag@sfbay 2004-08-30