Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-1058: override the close method so it doesn't try to close the null Reader input

Grant Ingersoll11895271a3b4
diff --git a/src/java/org/apache/lucene/analysis/SinkTokenizer.java b/src/java/org/apache/lucene/analysis/SinkTokenizer.java
index f4863805df5..86c96fca3d3 100644
--- a/src/java/org/apache/lucene/analysis/SinkTokenizer.java
+++ b/src/java/org/apache/lucene/analysis/SinkTokenizer.java
@@ -64,6 +64,12 @@ public class SinkTokenizer extends Tokenizer {
lst.add((Token) t.clone());
}
+ public void close() throws IOException {
+ //nothing to close
+ input = null;
+ lst = null;
+ }
+
/**
* Reset the internal data structures to the start at the front of the list of tokens. Should be called
* if tokens were added to the list after an invocation of {@link #next(Token)}