LUCENE-3898: reset() was missing some state

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1303441 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-03-21 15:22:28 +00:00
parent f3b90132c9
commit 1a191f4edc
1 changed files with 5 additions and 2 deletions

View File

@ -609,11 +609,14 @@ public final class SynonymFilter extends TokenFilter {
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();
}