Skip to content

Bug in previousClearBit #15

@incaseoftrouble

Description

@incaseoftrouble

Hi,

while testing the 1.2 version I found the following issue:

SparseBitSet set = new SparseBitSet();
set.set(0);
set.set(64);
System.out.println(set.previousClearBit(64));
set.clear(0);
set.set(1);
System.out.println(set.previousClearBit(64));

Expected: (consistent with BitSet)

63
63

Got:

-1
0

@BrentDouglas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions