lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r1354361 - /lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
Date Thu, 28 Jun 2012 09:13:59 GMT
Very Nice!
I prefer this one, too!
 
Uwe

P.S.: And now please also wrap with Collections.unmodifiableSet() :-)
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: dweiss@apache.org [mailto:dweiss@apache.org]
> Sent: Wednesday, June 27, 2012 10:17 AM
> To: commits@lucene.apache.org
> Subject: svn commit: r1354361 - /lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.ja
> va
> 
> Author: dweiss
> Date: Wed Jun 27 08:16:37 2012
> New Revision: 1354361
> 
> URL: http://svn.apache.org/viewvc?rev=1354361&view=rev
> Log:
> Replacing hackish with stylish...
> 
> Modified:
>     lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.ja
> va
> 
> Modified: lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.ja
> va
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.ja
> va?rev=1354361&r1=1354360&r2=1354361&view=diff
> ================================================================
> ==============
> --- lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.ja
> va (original)
> +++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/an
> +++ alysis/BaseTokenStreamTestCase.java Wed Jun 27 08:16:37 2012
> @@ -25,16 +25,9 @@ import java.io.Reader;  import java.io.StringReader;
> import java.io.StringWriter;  import java.io.Writer; -import java.util.ArrayList; -
> import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -
> import java.util.Map; -import java.util.Random; -import java.util.Set;
> +import java.util.*;
> 
>  import org.apache.lucene.analysis.tokenattributes.*;
> -import org.apache.lucene.codecs.PostingsFormat;
>  import org.apache.lucene.document.Document;
>  import org.apache.lucene.document.Field;  import
> org.apache.lucene.document.FieldType;
> @@ -480,14 +473,14 @@ public abstract class BaseTokenStreamTes
>      }
>    }
> 
> -  static final Set<String> doesntSupportOffsets = new HashSet<String>()
{{
> -    add("Lucene3x");
> -    add("MockFixedIntBlock");
> -    add("MockVariableIntBlock");
> -    add("MockSep");
> -    add("MockRandom");
> -  }};
> -
> +  static final Set<String> doesntSupportOffsets = new
> HashSet<String>(Arrays.asList(
> +    "Lucene3x",
> +    "MockFixedIntBlock",
> +    "MockVariableIntBlock",
> +    "MockSep",
> +    "MockRandom"
> +  ));
> +
>    private static void checkRandomData(Random random, Analyzer a, int
> iterations, int maxWordLength, boolean useCharFilter, boolean simple, boolean
> offsetsAreCorrect, RandomIndexWriter iw) throws IOException {
> 
>      final LineFileDocs docs = new LineFileDocs(random);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message