r108952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108951‎ | r108952 | r108953 >
Date:04:16, 15 January 2012
Author:oren
Status:ok
Tags:
Comment:
removed exception from overridden method signature
Modified paths:
  • /trunk/lucene-search-2/test/org/wikimedia/lsearch/analyzers/AnalysisTest.java (modified) (history)

Diff [purge]

Index: trunk/lucene-search-2/test/org/wikimedia/lsearch/analyzers/AnalysisTest.java
@@ -1,48 +1,29 @@
22 package org.wikimedia.lsearch.analyzers;
33
44 import java.io.IOException;
5 -import java.io.StringReader;
65 import java.util.ArrayList;
76 import java.util.Arrays;
87 import java.util.HashSet;
98
10 -import junit.framework.TestCase;
11 -
129 import org.apache.lucene.analysis.Analyzer;
1310 import org.apache.lucene.analysis.Token;
1411 import org.apache.lucene.analysis.TokenStream;
1512 import org.apache.lucene.analysis.cjk.CJKAnalyzer;
16 -import org.apache.lucene.analysis.standard.StandardAnalyzer;
1713 import org.apache.lucene.queryParser.ParseException;
1814 import org.apache.lucene.queryParser.QueryParser;
1915 import org.apache.lucene.search.Query;
20 -import org.wikimedia.lsearch.analyzers.Aggregate;
21 -import org.wikimedia.lsearch.analyzers.AggregateAnalyzer;
22 -import org.wikimedia.lsearch.analyzers.Analyzers;
23 -import org.wikimedia.lsearch.analyzers.ExtToken;
24 -import org.wikimedia.lsearch.analyzers.FieldBuilder;
25 -import org.wikimedia.lsearch.analyzers.FilterFactory;
26 -import org.wikimedia.lsearch.analyzers.KeywordsAnalyzer;
27 -import org.wikimedia.lsearch.analyzers.LanguageAnalyzer;
28 -import org.wikimedia.lsearch.analyzers.ReusableLanguageAnalyzer;
29 -import org.wikimedia.lsearch.analyzers.RelatedAnalyzer;
30 -import org.wikimedia.lsearch.analyzers.SplitAnalyzer;
3116 import org.wikimedia.lsearch.analyzers.Aggregate.Flags;
32 -import org.wikimedia.lsearch.beans.Title;
3317 import org.wikimedia.lsearch.config.Configuration;
3418 import org.wikimedia.lsearch.config.GlobalConfiguration;
3519 import org.wikimedia.lsearch.config.IndexId;
36 -import org.wikimedia.lsearch.index.WikiIndexModifier;
3720 import org.wikimedia.lsearch.ranks.StringList;
38 -import org.wikimedia.lsearch.related.RelatedTitle;
3921 import org.wikimedia.lsearch.test.WikiTestCase;
40 -import org.wikimedia.lsearch.util.MathFunc;
4122
4223 public class AnalysisTest extends WikiTestCase {
4324 Analyzer a = null;
4425 Configuration config = null;
4526
46 - protected void setUp() throws Exception {
 27+ protected void setUp() {
4728 super.setUp();
4829 if(config == null){
4930 config = Configuration.open();
@@ -109,7 +90,7 @@
11091
11192 public static Token[] tokensFromAnalysis(Analyzer analyzer, String text, String field) throws IOException {
11293 TokenStream stream = analyzer.tokenStream(field, text);
113 - ArrayList tokenList = new ArrayList();
 94+ ArrayList<Token> tokenList = new ArrayList<Token>();
11495 while (true) {
11596 Token token = stream.next();
11697 if (token == null) break;

Status & tagging log