On Thursday 12 July 2007 13:19, [EMAIL PROTECTED] wrote: > Slightly off topic question: why don't you use the existing > java.util.BitSet? This seems to work for me in Frost.
IIRC we needed some extra methods. Somebody should check into this.
>
> On 7/12/07, Sback <[EMAIL PROTECTED]> wrote:
> > When I try to set a bit in a place bigger than the BitArray size,
> > sometimes it does not raise an ArrayIndexOutOfBoundsException. It seems
> > that the problem is present when the BitArray size is not a multiple of
> > 8. IMHO the exception should be raised in each wrong case.
> >
> > Here you are the test code (you can find it in the trunk too):
> >
> > /**
> > * Tests setBit(int,boolean) method
> > * trying to set a bit out of bounds
> > */
> > public void testSetBit_OutOfBounds() {
> > BitArray methodBitArray = new BitArray(10);
> > try {
> > methodBitArray.setBit(10,true);
> > fail("Expected Exception Error Not Thrown!");}
> > catch (ArrayIndexOutOfBoundsException anException) {
> > assertNotNull(anException); }
> > }
> >
> > Thank you,
> >
> > Sback
> >
> > _______________________________________________
> > Devl mailing list
> > [email protected]
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
pgpo5uf2nS1a6.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
