Hi

I don't know if it's a bug or I don't use this properly, but I try to use
an OBS with fastSet/Get/Clear methods. In order to use fastSet I thought I
should call ensureCapacity, but that doesn't work since numBits isn't
changed and so the next fastSet trips the assertion. Here's a short
testcase:

  public void testEnsureCapacity() {
    OpenBitSet bits = new OpenBitSet(1);
    bits.fastSet(0);
    bits.ensureCapacity(5); // make room for more bits
    bits.fastSet(2);
  }

Is this a bug in OBS, or OBS doesn't support this usecase?

Shai

Reply via email to