summaryrefslogtreecommitdiff
path: root/java/math/BigInteger.java
diff options
context:
space:
mode:
authorPaul Fisher <rao@gnu.org>1999-01-19 23:39:04 +0000
committerPaul Fisher <rao@gnu.org>1999-01-19 23:39:04 +0000
commitcbd15e32ddf7971fe4da83a83a071d52958cf77d (patch)
treedd6c0d5ffe1823e7d445bd8e12fa91ba12cf869d /java/math/BigInteger.java
parent5d8512e026ea47c19a7240f0f91360ec51fe0731 (diff)
downloadclasspath-cbd15e32ddf7971fe4da83a83a071d52958cf77d.tar.gz
(equals): Clean up.
Diffstat (limited to 'java/math/BigInteger.java')
-rw-r--r--java/math/BigInteger.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/java/math/BigInteger.java b/java/math/BigInteger.java
index dcb017c44..ec6d5e838 100644
--- a/java/math/BigInteger.java
+++ b/java/math/BigInteger.java
@@ -1,13 +1,9 @@
-
package java.math;
-
public class BigInteger {
-
final int native_state = System.identityHashCode(this);
static {
- System.loadLibrary("gmp2");
System.loadLibrary("bigint");
initNativeState();
}
@@ -24,7 +20,7 @@ public class BigInteger {
native public BigInteger multiply(BigInteger val);
native public BigInteger divide(BigInteger val)
throws ArithmeticException;
- native public BigInteger remainder(BigInteger val)
+ native public BigInteger remainder(BigInteger val)
throws ArithmeticException;
native public BigInteger gcd(BigInteger val);
@@ -69,10 +65,7 @@ public class BigInteger {
native public int signum();
public boolean equals(Object o) {
- if (o == null || (!(o instanceof BigInteger))) return false;
- BigInteger integ = (BigInteger) o;
- if (this == integ) return true;
- return nativeEquals(integ);
+ return (o instanceof BigInteger && nativeEquals((BigInteger)o));
}
static native void initNativeState();