From 0c9ec9edf74cc2c930e39f3266e98a6f39157169 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Thu, 18 May 2006 07:56:37 +0000 Subject: [PATCH] fix for LUCENE-572 git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@407492 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 4 ++++ src/java/org/apache/lucene/search/spans/SpanNotQuery.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index a1b609d8d0c..894bc902c85 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -56,7 +56,11 @@ Bug fixes 11. LUCENE-352: Fixed bug in SpanNotQuery that manifested as NullPointerException when "exclude" query was not a SpanTermQuery. + (Chris Hostetter) +12. LUCENE-572: Fixed bug in hashCode, was ignoring exclude clause + (Chris Hostetter) + 1.9.1 Bug fixes diff --git a/src/java/org/apache/lucene/search/spans/SpanNotQuery.java b/src/java/org/apache/lucene/search/spans/SpanNotQuery.java index e30250476e1..bfbc0a5925e 100644 --- a/src/java/org/apache/lucene/search/spans/SpanNotQuery.java +++ b/src/java/org/apache/lucene/search/spans/SpanNotQuery.java @@ -172,7 +172,7 @@ public class SpanNotQuery extends SpanQuery { public int hashCode() { int h = include.hashCode(); h = (h<<1) | (h >>> 31); // rotate left - h ^= include.hashCode(); + h ^= exclude.hashCode(); h = (h<<1) | (h >>> 31); // rotate left h ^= Float.floatToRawIntBits(getBoost()); return h;