GitHub user jakob-zwiener opened a pull request:
https://github.com/apache/lucene-solr/pull/26
Reproduces and fixes issue LUCENE-5423
First commit adds a test that shows the unexpected behaviour. Should the
dcumentation of getAndSet be updated to recommend not setting bits right of
wlen the unexpected hashCode behaviour could be triggered by manually setting
wlen. Although bitsets having bits set right of wlen are kind of invalid in
themselves, fixing the hashCode method seems advisable.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jakob-zwiener/lucene-solr trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/26.patch
----
commit 1802f1bc128f85af604aa75d40629eef3ac9515c
Author: Jakob Zwiener <[email protected]>
Date: 2014-01-30T12:16:22Z
LUCENE-5423 added failing test reproducing the problem
commit d41d17deccc383523cdc24cecb81f269a9643c55
Author: Jakob Zwiener <[email protected]>
Date: 2014-01-30T12:20:18Z
LUCENE-5423 fixing hashCode method to only iterate valid bits
commit ab4290071d9a53716d93c625779e796600eefeab
Author: Jakob Zwiener <[email protected]>
Date: 2014-01-30T12:23:07Z
LUCENE-5423 fixed getAndSet documentation
bits right of wlen should not be set
----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]