diff options
| author | Paul Fisher <rao@gnu.org> | 1998-06-05 03:20:38 +0000 |
|---|---|---|
| committer | Paul Fisher <rao@gnu.org> | 1998-06-05 03:20:38 +0000 |
| commit | fb71eb149089eb5da2d6742e39389a8c789cac01 (patch) | |
| tree | 92a62949441517189a1df730e38934fddfece91b /java/math/BigInteger.java | |
| parent | ca9bfb9b55a81c816671cdb17812f3beef119061 (diff) | |
| download | classpath-fb71eb149089eb5da2d6742e39389a8c789cac01.tar.gz | |
(equals): Add null test.
Diffstat (limited to 'java/math/BigInteger.java')
| -rw-r--r-- | java/math/BigInteger.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/math/BigInteger.java b/java/math/BigInteger.java index 9108cc4ca..1ed87dfa8 100644 --- a/java/math/BigInteger.java +++ b/java/math/BigInteger.java @@ -65,7 +65,7 @@ public class BigInteger { native public int signum(); public boolean equals(Object o) { - if (!(o instanceof BigInteger)) return false; + if (o == null || (!(o instanceof BigInteger))) return false; BigInteger integ = (BigInteger) o; if (this == integ) return true; return nativeEquals(integ); |
