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.
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.
- duplicates
-
JDK-8015317 Optional.filter, map, and flatMap
-
- Closed
-