mirror of https://github.com/apache/lucene.git
LUCENE-2197: don't copy CharArraySet in StopFilter
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@898866 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
476d155185
commit
7bdac8e555
|
@ -102,7 +102,7 @@ public final class StopFilter extends TokenFilter {
|
|||
*/
|
||||
private StopFilter(Version matchVersion, boolean enablePositionIncrements, TokenStream input, Set<?> stopWords, boolean ignoreCase){
|
||||
super(input);
|
||||
this.stopWords = CharArraySet.unmodifiableSet(new CharArraySet(matchVersion, stopWords, ignoreCase));
|
||||
this.stopWords = stopWords instanceof CharArraySet ? (CharArraySet)stopWords : new CharArraySet(matchVersion, stopWords, ignoreCase);
|
||||
this.enablePositionIncrements = enablePositionIncrements;
|
||||
termAtt = addAttribute(TermAttribute.class);
|
||||
posIncrAtt = addAttribute(PositionIncrementAttribute.class);
|
||||
|
|
Loading…
Reference in New Issue