lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r791264 - /lucene/java/trunk/src/java/org/apache/lucene/search/FuzzyQuery.java
Date Sun, 05 Jul 2009 16:15:00 GMT
Author: uschindler
Date: Sun Jul  5 16:15:00 2009
New Revision: 791264

URL: http://svn.apache.org/viewvc?rev=791264&view=rev
Log:
Fix equals() and hashCode() of FuzzyQuery (boost etc. missing, so use super methods)

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/FuzzyQuery.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FuzzyQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FuzzyQuery.java?rev=791264&r1=791263&r2=791264&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FuzzyQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FuzzyQuery.java Sun Jul  5 16:15:00
2009
@@ -211,7 +211,7 @@
 
   public int hashCode() {
     final int prime = 31;
-    int result = 1;
+    int result = super.hashCode();
     result = prime * result + Float.floatToIntBits(minimumSimilarity);
     result = prime * result + prefixLength;
     result = prime * result + ((term == null) ? 0 : term.hashCode());
@@ -221,7 +221,7 @@
   public boolean equals(Object obj) {
     if (this == obj)
       return true;
-    if (obj == null)
+    if (!super.equals(obj))
       return false;
     if (getClass() != obj.getClass())
       return false;



Mime
View raw message