Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8341736

Investigate how Javadoc can suggest replacement APIs

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 24
    • tools
    • None

      There are many outdated APIs, such as java.util.Vector, java.util.Stack, java.util.StringTokenizer, java.util.LinkedList, that sometimes appear in newly written code. These classes have specifications that ask to use replacements, but those are unremarkable and easily ignored. Meanwhile, deprecation is overkill as usage of these APIs should not generate new compiler warnings in legacy code.

      It would be great if javadoc had a consistent and specified way of suggesting newer APIs that displays such suggestions in a straightforward way, similar to preview or deprecation warning boxes.

      A `@SupersededBy` annotation could be used by IDEs to suggest the replacement API.

            nbenalla Nizar Benalla
            nbenalla Nizar Benalla
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: