2002-04-01 Mark Wielaard <mark@klomp.org>
+ * java/util/BitSet.java (BitSet(int)): if nbits < 0 throw
+ NegativeArraySizeException
+ (clear(int)): Use sign extended shift.
+ (flip(int)): Likewise.
+ (get(int)): Likewise.
+ (nextClearBit(int)): Likewise.
+ (nextSetBit(int)): Likewise.
+ (set(int)): Likewise.
+
+2002-04-01 Mark Wielaard <mark@klomp.org>
+
* mauve-libgcj: Add JDK1.3, JDK1.4, JLS1.2 tests, remove ignored tests
that can be compiled now and add testsuite crashers to ignore list.
*/
public BitSet(int nbits)
{
+ if (nbits < 0)
+ throw new NegativeArraySizeException();
+
int length = nbits >>> 6;
if ((nbits & LONG_MASK) != 0)
++length;
*/
public void clear(int pos)
{
- int offset = pos >>> 6;
+ int offset = pos >> 6;
ensure(offset);
// ArrayIndexOutOfBoundsException subclasses IndexOutOfBoundsException,
// so we'll just let that be our exception.
*/
public void flip(int index)
{
- int offset = index >>> 6;
+ int offset = index >> 6;
ensure(offset);
// ArrayIndexOutOfBoundsException subclasses IndexOutOfBoundsException,
// so we'll just let that be our exception.
*/
public boolean get(int pos)
{
- int offset = pos >>> 6;
+ int offset = pos >> 6;
if (offset >= bits.length)
return false;
// ArrayIndexOutOfBoundsException subclasses IndexOutOfBoundsException,
*/
public int nextClearBit(int from)
{
- int offset = from >>> 6;
+ int offset = from >> 6;
long mask = 1L << from;
while (offset < bits.length)
{
*/
public int nextSetBit(int from)
{
- int offset = from >>> 6;
+ int offset = from >> 6;
long mask = 1L << from;
while (offset < bits.length)
{
*/
public void set(int pos)
{
- int offset = pos >>> 6;
+ int offset = pos >> 6;
ensure(offset);
// ArrayIndexOutOfBoundsException subclasses IndexOutOfBoundsException,
// so we'll just let that be our exception.