mirror of https://github.com/apache/lucene.git
fix OpenBitSet.hashCode rotate
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@690302 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4661a1b02b
commit
0b9512aa23
|
@ -763,7 +763,7 @@ public class OpenBitSet extends DocIdSet implements Cloneable, Serializable {
|
||||||
long h = 0x98761234; // something non-zero for length==0
|
long h = 0x98761234; // something non-zero for length==0
|
||||||
for (int i = bits.length; --i>=0;) {
|
for (int i = bits.length; --i>=0;) {
|
||||||
h ^= bits[i];
|
h ^= bits[i];
|
||||||
h = (h << 1) | (h >>> 31); // rotate left
|
h = (h << 1) | (h >>> 63); // rotate left
|
||||||
}
|
}
|
||||||
return (int)((h>>32) ^ h); // fold leftmost bits into right
|
return (int)((h>>32) ^ h); // fold leftmost bits into right
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue