RFR: 8276048: Error in javadoc regarding Long method public static Long valueOf(String s)
8276048: Error in javadoc regarding Long method public static Long valueOf(String s) Fix: Changing integer to {@code Long} ------------- Commit messages: - Update Long.java Changes: https://git.openjdk.java.net/jdk/pull/6135/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6135&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8276048 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6135.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6135/head:pull/6135 PR: https://git.openjdk.java.net/jdk/pull/6135
On Wed, 27 Oct 2021 09:57:43 GMT, swati sharma <duke@openjdk.java.net> wrote:
8276048: Error in javadoc regarding Long method public static Long valueOf(String s) Fix: Changing integer to {@code Long}
src/java.base/share/classes/java/lang/Long.java line 1141:
1139: * exactly as if the argument were given to the {@link 1140: * #parseLong(java.lang.String)} method. The result is a 1141: * {@code Long} object that represents the {@code Long} value
I think it should be `{@code long}`, i.e., the primitive type, not the class, for consistency with other numeric classes. ------------- PR: https://git.openjdk.java.net/jdk/pull/6135
On Wed, 27 Oct 2021 09:57:43 GMT, swati sharma <duke@openjdk.java.net> wrote:
8276048: Error in javadoc regarding Long method public static Long valueOf(String s) Fix: Changing integer to {@code Long}
Strictly speaking I do not view the current text as erroneous. At time "integer" is used an adjective; for example, 1 is an integer number while 1.5 is not. I've sometimes used "integral" as an adjective to avoid any confusion with the int(eger) type. ------------- PR: https://git.openjdk.java.net/jdk/pull/6135
On Wed, 27 Oct 2021 09:57:43 GMT, swati sharma <duke@openjdk.java.net> wrote:
8276048: Error in javadoc regarding Long method public static Long valueOf(String s) Fix: Changing integer to {@code Long}
I agree with Joe there is nothing to fix here - "integer" is general mathematical term. If it were "int" or "Integer" then that would be different. ------------- PR: https://git.openjdk.java.net/jdk/pull/6135
On Wed, 27 Oct 2021 09:57:43 GMT, swati sharma <duke@openjdk.java.net> wrote:
8276048: Error in javadoc regarding Long method public static Long valueOf(String s) Fix: Changing integer to {@code Long}
This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6135
participants (4)
-
Brian Burkhalter
-
David Holmes
-
Joe Darcy
-
swati sharma