# HG changeset patch # User bpb # Date 1422642225 28800 # Node ID af951d0d26070c98cae0abf4b27b48052bef105a # Parent 5b8db585a33c3cc48e70e688ceee57dd9271dc5d 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 diff -r 5b8db585a33c -r af951d0d2607 jdk/src/java.base/share/classes/java/lang/Number.java --- 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 The Java™ Language Specification + * as defined in The Java™ Language Specification * 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}. * *

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}. * *

This implementation returns the result of {@link #intValue} cast * to a {@code short}.