mirror of https://github.com/apache/lucene.git
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:
parent
f3b90132c9
commit
1a191f4edc
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue