aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/Byte.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/Byte.java')
-rw-r--r--libjava/java/lang/Byte.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/libjava/java/lang/Byte.java b/libjava/java/lang/Byte.java
index 78f34aa..347e252 100644
--- a/libjava/java/lang/Byte.java
+++ b/libjava/java/lang/Byte.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.
@@ -115,17 +115,15 @@ public final class Byte extends Number implements Comparable
}
// Added in JDK 1.2
- public int compareTo(Object o) throws ClassCastException
+ /** @throws ClassCastException */
+ public int compareTo(Object o)
{
- if (o instanceof Byte)
- return this.value - ((Byte) o).value;
- else
- throw new ClassCastException();
+ return this.value - ((Byte) o).value;
}
public boolean equals(Object obj)
{
- return obj != null && (obj instanceof Byte) && ((Byte)obj).value == value;
+ return (obj instanceof Byte) && ((Byte)obj).value == value;
}
// Verified that hashCode is returns plain value (see Boolean_1 test).