summaryrefslogtreecommitdiffstats
path: root/libjava/java/lang/Float.java
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-09 02:56:38 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-09 02:56:38 +0000
commit8cc2e82455f265d2664f4aa786e85bce34195919 (patch)
tree69de4af6d48ae5e4075714c8cdaa85fdc622abe4 /libjava/java/lang/Float.java
parent95e4499f5b9dc067678b1fb219edc11aadfedc4a (diff)
downloadppe42-gcc-8cc2e82455f265d2664f4aa786e85bce34195919.tar.gz
ppe42-gcc-8cc2e82455f265d2664f4aa786e85bce34195919.zip
* java/lang/Byte.java: Remove redundant instanceof and null checks.
* java/lang/Integer.java: Likewise. * java/lang/Long.java: Likewise. * java/lang/Short.java: Likewise. * java/lang/Double.java: Likewise. (doubleToRawLongBits): New method. * java/lang/Float.java: As above. (floatToRawIntBits): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/Float.java')
-rw-r--r--libjava/java/lang/Float.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/libjava/java/lang/Float.java b/libjava/java/lang/Float.java
index 4a1f7fecc02..f15b06d2157 100644
--- a/libjava/java/lang/Float.java
+++ b/libjava/java/lang/Float.java
@@ -64,9 +64,6 @@ public final class Float extends Number implements Comparable
public boolean equals (Object obj)
{
- if (obj == null)
- return false;
-
if (!(obj instanceof Float))
return false;
@@ -115,12 +112,8 @@ public final class Float extends Number implements Comparable
return Double.toString ((double) v, true);
}
- public static Float valueOf (String s) throws NullPointerException,
- NumberFormatException
+ public static Float valueOf (String s) throws NumberFormatException
{
- if (s == null)
- throw new NullPointerException ();
-
return new Float (Double.valueOf (s).floatValue ());
}
@@ -152,6 +145,13 @@ public final class Float extends Number implements Comparable
}
public static native int floatToIntBits (float value);
+
+ public static int floatToRawIntBits (float value)
+ {
+ // FIXME: Is this supposed to be different? NaN values seem to be handled
+ // the same in the JDK.
+ return floatToIntBits (value);
+ }
public static native float intBitsToFloat (int bits);
OpenPOWER on IntegriCloud