summaryrefslogtreecommitdiff
path: root/java/math/BigInteger.java
diff options
context:
space:
mode:
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();