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

(bf) Some covariant overrides are missing @since tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs
    • b07

      JDK-8176865 removed a bunch of @since tags from doc comments for overriding methods. Most of these were correct to remove, because the override was merely providing an implementation of a method that was already declared in a superclass or superinterface. The set of programs that could be written didn't change with the addition of these overrides (setting aside things like reflective access). Thus, it was appropriate for these overrides not to have a @since tag.

      However, that bugfix was too aggressive in removing @since tags; it removed them from covariant overrides as well as ordinary overrides. Because the introduction of a covariant override expands the set of possible programs that can be written, the addition of a @since tag is warranted.

      The commit with the JDK-8176865 changes is here:

      https://github.com/openjdk/jdk/commit/31374e10a35119118791b91275ff2b46cc96074f

      Most, if not all, of the covariant overrides from which @since was erroneously removed are the Buffer overrides in java.nio; I've thus filed this bug in that category. However, those changes should be audited to determine whether any other @since tags were erroneously removed from other covariant overrides.

            bpb Brian Burkhalter
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: