diff --git a/CHANGES.txt b/CHANGES.txt index ace84d9ef73..21bd668f807 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -314,6 +314,8 @@ Optimizations documents, and a slight performance increase for top level conjunctions. (yonik) +14. LUCENE-1098: Make inner class StandardAnalyzer.SavedStreams static + and final. (Nathan Beyer via Michael Busch) Documentation diff --git a/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java b/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java index 964e15b54a1..26821d33644 100644 --- a/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java +++ b/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java @@ -76,10 +76,11 @@ public class StandardAnalyzer extends Analyzer { return result; } - private class SavedStreams { + private static final class SavedStreams { StandardTokenizer tokenStream; TokenStream filteredTokenStream; - }; + } + public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException { SavedStreams streams = (SavedStreams) getPreviousTokenStream(); if (streams == null) {