mirror of
https://github.com/apache/lucene.git
synced 2025-02-23 10:51:29 +00:00
cosmetics
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@479755 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
06b36cb004
commit
64d4421321
@ -237,7 +237,7 @@ public class AnalyzerUtil {
|
||||
final ArrayList tokens = (ArrayList) cache.get(fieldName);
|
||||
if (tokens == null) { // not yet cached
|
||||
final ArrayList tokens2 = new ArrayList();
|
||||
TokenStream stream = new TokenFilter(child.tokenStream(fieldName, reader)) {
|
||||
TokenStream tokenStream = new TokenFilter(child.tokenStream(fieldName, reader)) {
|
||||
|
||||
public Token next() throws IOException {
|
||||
Token token = input.next(); // from filter super class
|
||||
@ -245,8 +245,9 @@ public class AnalyzerUtil {
|
||||
return token;
|
||||
}
|
||||
};
|
||||
|
||||
cache.put(fieldName, tokens2);
|
||||
return stream;
|
||||
return tokenStream;
|
||||
} else { // already cached
|
||||
return new TokenStream() {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user