code cleanup per codacy

This commit is contained in:
Jeremy Long
2017-12-28 06:25:36 -05:00
parent a85a0456bc
commit 48ff396e7e

View File

@@ -49,6 +49,7 @@ public class TokenPairConcatenatingFilterTest extends BaseTokenStreamTestCase {
} }
}; };
} }
/** /**
* Test of incrementToken method, of class TokenPairConcatenatingFilter. * Test of incrementToken method, of class TokenPairConcatenatingFilter.
*/ */
@@ -63,7 +64,6 @@ public class TokenPairConcatenatingFilterTest extends BaseTokenStreamTestCase {
assertAnalyzesTo(analyzer, "red blue green", expected); assertAnalyzesTo(analyzer, "red blue green", expected);
} }
/** /**
* copied from * copied from
* http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java * http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java
@@ -83,7 +83,7 @@ public class TokenPairConcatenatingFilterTest extends BaseTokenStreamTestCase {
* *
* @throws IOException * @throws IOException
*/ */
public void testEmptyTerm() throws IOException { public void testEmptyTerm() {
Analyzer a = new Analyzer() { Analyzer a = new Analyzer() {
@Override @Override
protected Analyzer.TokenStreamComponents createComponents(String fieldName) { protected Analyzer.TokenStreamComponents createComponents(String fieldName) {
@@ -91,7 +91,11 @@ public class TokenPairConcatenatingFilterTest extends BaseTokenStreamTestCase {
return new Analyzer.TokenStreamComponents(tokenizer, new TokenPairConcatenatingFilter(tokenizer)); return new Analyzer.TokenStreamComponents(tokenizer, new TokenPairConcatenatingFilter(tokenizer));
} }
}; };
try {
checkOneTerm(a, "", ""); checkOneTerm(a, "", "");
} catch (IOException ex) {
fail("Failed test random strings: " + ex.getMessage());
}
} }
} }