You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/03/21 16:24:48 UTC

svn commit: r1303442 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java lucene/contrib/facet/ solr/ solr/core/

Author: mikemccand
Date: Wed Mar 21 15:24:48 2012
New Revision: 1303442

URL: http://svn.apache.org/viewvc?rev=1303442&view=rev
Log:
LUCENE-3898: reset() was missing some state

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java
    lucene/dev/branches/branch_3x/lucene/contrib/facet/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/core/   (props changed)

Modified: lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java?rev=1303442&r1=1303441&r2=1303442&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java Wed Mar 21 15:24:48 2012
@@ -609,11 +609,14 @@ public final class SynonymFilter extends
     super.reset();
     captureCount = 0;
     finished = false;
+    inputSkipCount = 0;
+    nextRead = nextWrite = 0;
 
     // In normal usage these resets would not be needed,
     // since they reset-as-they-are-consumed, but the app
-    // may not consume all input tokens in which case we
-    // have leftover state here:
+    // may not consume all input tokens (or we might hit an
+    // exception), in which case we have leftover state
+    // here:
     for (PendingInput input : futureInputs) {
       input.reset();
     }