You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Luc Vanlerberghe (JIRA)" <ji...@apache.org> on 2015/04/15 16:11:59 UTC

[jira] [Created] (LUCENE-6427) BitSet fixes - assert on presence of 'ghost bits' and others

Luc Vanlerberghe created LUCENE-6427:
----------------------------------------

             Summary: BitSet fixes - assert on presence of 'ghost bits' and others
                 Key: LUCENE-6427
                 URL: https://issues.apache.org/jira/browse/LUCENE-6427
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/other
            Reporter: Luc Vanlerberghe


Fixes after reviewing org.apache.lucene.util.FixedBitSet, LongBitSet and corresponding tests:
* Some methods rely on the fact that no bits are set after numBits (what I call 'ghost' bits here).
** cardinality, nextSetBit, intersects and others may yield wrong results
** If ghost bits are present, they may become visible after ensureCapacity is called.
** The tests deliberately create bitsets with ghost bits, but then do not detect these failures
* FixedBitSet.cardinality scans the complete backing array, even if only numWords are in use




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org