diff options
Diffstat (limited to 'libjava/java/lang/Double.java')
-rw-r--r-- | libjava/java/lang/Double.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libjava/java/lang/Double.java b/libjava/java/lang/Double.java index 8de429e..a656b51 100644 --- a/libjava/java/lang/Double.java +++ b/libjava/java/lang/Double.java @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. @@ -54,9 +54,6 @@ public final class Double extends Number implements Comparable public boolean equals (Object obj) { - if (obj == null) - return false; - if (!(obj instanceof Double)) return false; @@ -108,12 +105,8 @@ public final class Double extends Number implements Comparable return toString (v, false); } - public static Double valueOf (String s) throws NullPointerException, - NumberFormatException + public static Double valueOf (String s) throws NumberFormatException { - if (s == null) - throw new NullPointerException (); - return new Double (parseDouble (s)); } @@ -146,6 +139,12 @@ public final class Double extends Number implements Comparable public static native long doubleToLongBits (double value); + public static long doubleToRawLongBits (double value) + { + // FIXME: Check that this is correct with respect to NaN values. + return doubleToLongBits (value); + } + public static native double longBitsToDouble (long bits); public int compareTo (Double d) |