Commit 48ff99d1 by Bryce McKinlay Committed by Bryce McKinlay

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

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

From-SVN: r28680
parent c6a9738c
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> Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile: Rebuilt. * Makefile: Rebuilt.
......
...@@ -56,7 +56,7 @@ public final class BitSet implements Cloneable, Serializable ...@@ -56,7 +56,7 @@ public final class BitSet implements Cloneable, Serializable
int bit = pos % 64; int bit = pos % 64;
int offset = pos / 64; int offset = pos / 64;
ensure (offset); ensure (offset);
bits[offset] &= ~ (1 << bit); bits[offset] &= ~ (1L << bit);
} }
public Object clone () public Object clone ()
...@@ -97,7 +97,7 @@ public final class BitSet implements Cloneable, Serializable ...@@ -97,7 +97,7 @@ public final class BitSet implements Cloneable, Serializable
if (offset >= bits.length) if (offset >= bits.length)
return false; return false;
return (bits[offset] & (1 << bit)) == 0 ? false : true; return (bits[offset] & (1L << bit)) == 0 ? false : true;
} }
public int hashCode () public int hashCode ()
...@@ -125,7 +125,7 @@ public final class BitSet implements Cloneable, Serializable ...@@ -125,7 +125,7 @@ public final class BitSet implements Cloneable, Serializable
int bit = pos % 64; int bit = pos % 64;
int offset = pos / 64; int offset = pos / 64;
ensure (offset); ensure (offset);
bits[offset] |= 1 << bit; bits[offset] |= 1L << bit;
} }
public int size () public int size ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment