[ https://issues.apache.org/jira/browse/LUCENE-6427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14496364#comment-14496364 ]
Adrien Grand commented on LUCENE-6427: -------------------------------------- bq. Perhaps the doc comment should only be left on the constructor and moved to a 'normal' comment for other methods. +1 bq. I needed the checkEmpty method I do use nextSetBit(0) for now, but that will throw an exception if the BitSet has 0 size... OK I see. Then can you rename to isEmpty() for consistency with java collections? bq. I did use the random() object Sorry I somehow misread your code! > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org