Skip to content

Apache Lucene open-source search software

remove floatToIntBits on slop in hashCode

Yonik Seeleybfe4a2405303
diff --git a/src/java/org/apache/lucene/search/PhraseQuery.java b/src/java/org/apache/lucene/search/PhraseQuery.java
index f7312f16041..c19536f933a 100644
--- a/src/java/org/apache/lucene/search/PhraseQuery.java
+++ b/src/java/org/apache/lucene/search/PhraseQuery.java
@@ -291,7 +291,7 @@ public class PhraseQuery extends Query {
/** Returns a hash code value for this object.*/
public int hashCode() {
return Float.floatToIntBits(getBoost())
- ^ Float.floatToIntBits(slop)
+ ^ slop
^ terms.hashCode()
^ positions.hashCode();
}