8067669: Documentation for methods in Number incomplete regarding too large values.
Summary: Remove statments about rounding and truncation from the *Valud() methods
Reviewed-by: rriggs, darcy, alundblad
--- a/jdk/src/java.base/share/classes/java/lang/Number.java Wed Jul 05 20:17:33 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Number.java Fri Jan 30 10:23:45 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
*
* For platform classes, the conversion is often analogous to a
* narrowing primitive conversion or a widening primitive conversion
- * as defining in <cite>The Java™ Language Specification</cite>
+ * as defined in <cite>The Java™ Language Specification</cite>
* for converting between primitive types. Therefore, conversions may
* lose information about the overall magnitude of a numeric value, may
* lose precision, and may even return a result of a different sign
@@ -54,8 +54,7 @@
*/
public abstract class Number implements java.io.Serializable {
/**
- * Returns the value of the specified number as an {@code int},
- * which may involve rounding or truncation.
+ * Returns the value of the specified number as an {@code int}.
*
* @return the numeric value represented by this object after conversion
* to type {@code int}.
@@ -63,8 +62,7 @@
public abstract int intValue();
/**
- * Returns the value of the specified number as a {@code long},
- * which may involve rounding or truncation.
+ * Returns the value of the specified number as a {@code long}.
*
* @return the numeric value represented by this object after conversion
* to type {@code long}.
@@ -72,8 +70,7 @@
public abstract long longValue();
/**
- * Returns the value of the specified number as a {@code float},
- * which may involve rounding.
+ * Returns the value of the specified number as a {@code float}.
*
* @return the numeric value represented by this object after conversion
* to type {@code float}.
@@ -81,8 +78,7 @@
public abstract float floatValue();
/**
- * Returns the value of the specified number as a {@code double},
- * which may involve rounding.
+ * Returns the value of the specified number as a {@code double}.
*
* @return the numeric value represented by this object after conversion
* to type {@code double}.
@@ -90,8 +86,7 @@
public abstract double doubleValue();
/**
- * Returns the value of the specified number as a {@code byte},
- * which may involve rounding or truncation.
+ * Returns the value of the specified number as a {@code byte}.
*
* <p>This implementation returns the result of {@link #intValue} cast
* to a {@code byte}.
@@ -105,8 +100,7 @@
}
/**
- * Returns the value of the specified number as a {@code short},
- * which may involve rounding or truncation.
+ * Returns the value of the specified number as a {@code short}.
*
* <p>This implementation returns the result of {@link #intValue} cast
* to a {@code short}.