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

javadoc of java.util.Arrays.compare(T[] a, T[] b) misses the word "less"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b25
    • Verification:
      Not verified

      Description

      javadoc of Arrays.compare(T[] a, T[] b), line 7122

                   * A {@code null} array element is considered lexicographically than a
                   * non-{@code null} array element. Two {@code null} array elements are
                   * considered equal.

      Should be:

                  * A {@code null} array element is considered lexicographically less than a
                  * non-{@code null} array element. Two {@code null} array elements are
                  * considered equal.

      Confirmed in test: test/jdk/java/util/Arrays/ArraysEqCmpTest.testNullElementsInObjectArray().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jboes Julia Boes
                Reporter:
                jboes Julia Boes
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: