Typo in Javadoc of Optional{Int, Double, Long}
bitter_fox
bitterfoxc at gmail.com
Thu Nov 21 08:49:21 PST 2013
Hi,
I found a typo in Javadoc of Optional{Int, Double, Long}:
--------------------------------------------------------------
/**
* {@code get()} will return the value.
*/
public final class OptionalInt {
...
public int getAsInt() {
---------------------------------------------------------
" * {@code get()} will return the value."
would be
" * {@code getAsInt()} will return the value."
OptionalDouble and Long have a same typo.
diff -r 042a473535aa src/share/classes/java/util/OptionalDouble.java
--- a/src/share/classes/java/util/OptionalDouble.java Thu Oct 17 19:47:47
2013 -0700
+++ b/src/share/classes/java/util/OptionalDouble.java Fri Nov 22 01:44:55
2013 +0900
@@ -31,7 +31,7 @@
/**
* A container object which may or may not contain a {@code double} value.
* If a value is present, {@code isPresent()} will return {@code true} and
- * {@code get()} will return the value.
+ * {@code getAsDouble()} will return the value.
*
* <p>Additional methods that depend on the presence or absence of a
contained
* value are provided, such as {@link #orElse(double) orElse()}
diff -r 042a473535aa src/share/classes/java/util/OptionalInt.java
--- a/src/share/classes/java/util/OptionalInt.java Thu Oct 17 19:47:47
2013 -0700
+++ b/src/share/classes/java/util/OptionalInt.java Fri Nov 22 01:44:55
2013 +0900
@@ -31,7 +31,7 @@
/**
* A container object which may or may not contain a {@code int} value.
* If a value is present, {@code isPresent()} will return {@code true} and
- * {@code get()} will return the value.
+ * {@code getAsInt()} will return the value.
*
* <p>Additional methods that depend on the presence or absence of a
contained
* value are provided, such as {@link #orElse(int) orElse()}
diff -r 042a473535aa src/share/classes/java/util/OptionalLong.java
--- a/src/share/classes/java/util/OptionalLong.java Thu Oct 17 19:47:47
2013 -0700
+++ b/src/share/classes/java/util/OptionalLong.java Fri Nov 22 01:44:55
2013 +0900
@@ -31,7 +31,7 @@
/**
* A container object which may or may not contain a {@code long} value.
* If a value is present, {@code isPresent()} will return {@code true} and
- * {@code get()} will return the value.
+ * {@code getAsLong()} will return the value.
*
* <p>Additional methods that depend on the presence or absence of a
contained
* value are provided, such as {@link #orElse(long) orElse()}
Regards,
bitter_fox
More information about the lambda-dev
mailing list