BitSet.java (set, [...]): specify "1" constant as long.

* java/util/BitSet.java (set, clear, hashCode): specify "1" constant
        as long.

From-SVN: r28680
This commit is contained in:
Bryce McKinlay 1999-08-11 21:30:31 +00:00 committed by Bryce McKinlay
parent c6a9738c04
commit 48ff99d10d
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
1999-08-11 Bryce McKinlay <bryce@albatross.co.nz>
* java/util/BitSet.java (set, clear, hashCode): specify "1" constant
as long.
Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile: Rebuilt.

View File

@ -56,7 +56,7 @@ public final class BitSet implements Cloneable, Serializable
int bit = pos % 64;
int offset = pos / 64;
ensure (offset);
bits[offset] &= ~ (1 << bit);
bits[offset] &= ~ (1L << bit);
}
public Object clone ()
@ -97,7 +97,7 @@ public final class BitSet implements Cloneable, Serializable
if (offset >= bits.length)
return false;
return (bits[offset] & (1 << bit)) == 0 ? false : true;
return (bits[offset] & (1L << bit)) == 0 ? false : true;
}
public int hashCode ()
@ -125,7 +125,7 @@ public final class BitSet implements Cloneable, Serializable
int bit = pos % 64;
int offset = pos / 64;
ensure (offset);
bits[offset] |= 1 << bit;
bits[offset] |= 1L << bit;
}
public int size ()