You're using it correctly. It just looks like a bug in the asserts that were added at some point. -Yonik
On Thu, Oct 10, 2013 at 12:36 AM, Shai Erera <[email protected]> wrote: > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
