lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r898866 - /lucene/java/trunk/src/java/org/apache/lucene/analysis/StopFilter.java
Date Wed, 13 Jan 2010 18:06:55 GMT
Author: yonik
Date: Wed Jan 13 18:06:55 2010
New Revision: 898866

URL: http://svn.apache.org/viewvc?rev=898866&view=rev
Log:
LUCENE-2197: don't copy CharArraySet in StopFilter

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/analysis/StopFilter.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/analysis/StopFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/StopFilter.java?rev=898866&r1=898865&r2=898866&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/StopFilter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/StopFilter.java Wed Jan 13 18:06:55
2010
@@ -102,7 +102,7 @@
    */
   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);



Mime
View raw message