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

java.util.Optional{Long,Double}.equals(..) Javadoc copy and paste mistake

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8
    • core-libs

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      In jdk8-b99, the Javadoc for both OptionalLong and OptionalDouble states the following in the " equals " method Javadoc:
      =====
       " Indicates whether some other object is " equal to " this Optional. The other object is considered equal if it is also an {@code OptionalInt} and [...] "

      Sources:
      http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/9b6070690e50/src/share/classes/java/util/OptionalLong.java

      http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/9b6070690e50/src/share/classes/java/util/OptionalDouble.java
      =====
      Saying " OptionalInt " is wrong.

      Instead
      *for java.util.OptionalLong it should say " OptionalLong " and
      *for java.util.OptionalDouble it should say " OptionalDouble " .


      REPRODUCIBILITY :
      This bug can be reproduced always.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: