GitHub user LucVL opened a pull request:
https://github.com/apache/lucene-solr/pull/113
BitSet fixes
* `LongBitSet.ensureCapacity` overflows on `numBits > Integer.MaxValue`
* `Fixed-/LongBitSet`: Avoid conditional branch in `bits2words` (with a
comment explaining the formula)
TODO:
* Harmonize the use of `numWords` vs. `bits.length` vs. `numBits`
* E.g.: `cardinality` scans up to `bits.length`, while `or` asserts on
`index<numBits`
* If a `BitSet` is allocated with `n` bits, `ensureCapacity` with the same
number `n` shouldn't grow the `BitSet`
* Either both should allocate a larger array than really needed or neither.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/LucVL/lucene-solr BitSetFixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/113.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #113
----
commit 44adaaa577839225f60a355fc3538631e0b9e965
Author: Luc Vanlerberghe <[email protected]>
Date: 2014-12-12T15:48:23Z
Demonstrate bug in LongBitSet.ensureCapacity
commit bb4257da61d45ab559ff8e3b23d9aa1d3981d366
Author: Luc Vanlerberghe <[email protected]>
Date: 2014-12-12T15:53:54Z
LongBitSet.ensureCapacity: Cast to long *before* shifting left!
commit a70e1d4b1b654e2e3655c289485af28ecdc9cd92
Author: Luc Vanlerberghe <[email protected]>
Date: 2014-12-12T16:17:09Z
Avoid an "if" in bits2words and corrected some comments
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]