remove unnecessary "throws Exception" declarations from test method signatures
Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/ccfb4562 Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/ccfb4562 Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/ccfb4562 Branch: refs/heads/master Commit: ccfb4562b71c5abf4ddf5f761b56acc90bdc4af2 Parents: bbd9800 Author: Pascal Schumacher <pascalschumac...@gmx.net> Authored: Sat Nov 4 13:20:44 2017 +0100 Committer: Pascal Schumacher <pascalschumac...@gmx.net> Committed: Sat Nov 4 13:20:44 2017 +0100 ---------------------------------------------------------------------- .../org/apache/commons/text/CaseUtilsTest.java | 2 +- .../commons/text/CharacterPredicatesTest.java | 2 +- .../commons/text/ExtendedMessageFormatTest.java | 2 +- .../commons/text/RandomStringGeneratorTest.java | 2 +- .../commons/text/StringEscapeUtilsTest.java | 16 ++++++++-------- .../org/apache/commons/text/WordUtilsTest.java | 4 ++-- .../commons/text/similarity/FuzzyScoreTest.java | 10 +++++----- .../text/similarity/JaccardDistanceTest.java | 6 +++--- .../text/similarity/JaccardSimilarityTest.java | 6 +++--- .../text/similarity/JaroWinklerDistanceTest.java | 6 +++--- .../LevenshteinDetailedDistanceTest.java | 10 +++++----- .../text/similarity/LevenshteinDistanceTest.java | 10 +++++----- .../LongestCommonSubsequenceDistanceTest.java | 6 +++--- .../similarity/LongestCommonSubsequenceTest.java | 18 +++++++++--------- .../text/translate/AggregateTranslatorTest.java | 4 ++-- 15 files changed, 52 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/CaseUtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/CaseUtilsTest.java b/src/test/java/org/apache/commons/text/CaseUtilsTest.java index 5b085ce..33ee577 100644 --- a/src/test/java/org/apache/commons/text/CaseUtilsTest.java +++ b/src/test/java/org/apache/commons/text/CaseUtilsTest.java @@ -41,7 +41,7 @@ public class CaseUtilsTest { //------------------------------------------------------------------------ @Test - public void testToCamelCase() throws Exception { + public void testToCamelCase() { assertThat(CaseUtils.toCamelCase(null, false, null)).isNull(); assertThat(CaseUtils.toCamelCase("", true, null)).isEqualTo(""); assertThat(CaseUtils.toCamelCase(" ", false, null)).isEqualTo(" "); http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java b/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java index 070a84a..e16ac13 100644 --- a/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java +++ b/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java @@ -26,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class CharacterPredicatesTest { @Test - public void testLetters() throws Exception { + public void testLetters() { assertThat(CharacterPredicates.LETTERS.test('a')).isTrue(); assertThat(CharacterPredicates.LETTERS.test('Z')).isTrue(); http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java index 4bd691a..b17a228 100644 --- a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java +++ b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java @@ -45,7 +45,7 @@ public class ExtendedMessageFormatTest { private final Map<String, FormatFactory> registry = new HashMap<>(); @Before - public void setUp() throws Exception { + public void setUp() { registry.put("lower", new LowerCaseFormatFactory()); registry.put("upper", new UpperCaseFormatFactory()); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java index be1443e..f6c40b1 100644 --- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java +++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java @@ -217,7 +217,7 @@ public class RandomStringGeneratorTest { } @Test(expected = IllegalArgumentException.class) - public void testBadMinAndMax() throws Exception { + public void testBadMinAndMax() { new RandomStringGenerator.Builder().withinRange(2, 1); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java index dcc9e91..84eba94 100644 --- a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java +++ b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java @@ -331,12 +331,12 @@ public class StringEscapeUtilsTest { } @Test - public void testUnescapeUnknownEntity() throws Exception { + public void testUnescapeUnknownEntity() { assertEquals("&zzzz;", StringEscapeUtils.unescapeHtml4("&zzzz;")); } @Test - public void testEscapeHtmlVersions() throws Exception { + public void testEscapeHtmlVersions() { assertEquals("Β", StringEscapeUtils.escapeHtml4("\u0392")); assertEquals("\u0392", StringEscapeUtils.unescapeHtml4("Β")); @@ -346,7 +346,7 @@ public class StringEscapeUtilsTest { @Test - public void testEscapeXml10() throws Exception { + public void testEscapeXml10() { assertEquals("a<b>c"d'e&f", StringEscapeUtils.escapeXml10("a<b>c\"d'e&f")); assertEquals("XML 1.0 should not escape \t \n \r", "a\tb\rc\nd", StringEscapeUtils.escapeXml10("a\tb\rc\nd")); @@ -362,7 +362,7 @@ public class StringEscapeUtilsTest { } @Test - public void testEscapeXml11() throws Exception { + public void testEscapeXml11() { assertEquals("a<b>c"d'e&f", StringEscapeUtils.escapeXml11("a<b>c\"d'e&f")); assertEquals("XML 1.1 should not escape \t \n \r", "a\tb\rc\nd", StringEscapeUtils.escapeXml11("a\tb\rc\nd")); @@ -410,7 +410,7 @@ public class StringEscapeUtilsTest { } @Test - public void testEscapeCsvString() throws Exception { + public void testEscapeCsvString() { assertEquals("foo.bar", StringEscapeUtils.escapeCsv("foo.bar")); assertEquals("\"foo,bar\"", StringEscapeUtils.escapeCsv("foo,bar")); assertEquals("\"foo\nbar\"", StringEscapeUtils.escapeCsv("foo\nbar")); @@ -422,7 +422,7 @@ public class StringEscapeUtilsTest { } @Test - public void testEscapeCsvWriter() throws Exception { + public void testEscapeCsvWriter() { checkCsvEscapeWriter("foo.bar", "foo.bar"); checkCsvEscapeWriter("\"foo,bar\"", "foo,bar"); checkCsvEscapeWriter("\"foo\nbar\"", "foo\nbar"); @@ -444,7 +444,7 @@ public class StringEscapeUtilsTest { } @Test - public void testUnescapeCsvString() throws Exception { + public void testUnescapeCsvString() { assertEquals("foo.bar", StringEscapeUtils.unescapeCsv("foo.bar")); assertEquals("foo,bar", StringEscapeUtils.unescapeCsv("\"foo,bar\"")); assertEquals("foo\nbar", StringEscapeUtils.unescapeCsv("\"foo\nbar\"")); @@ -458,7 +458,7 @@ public class StringEscapeUtilsTest { } @Test - public void testUnescapeCsvWriter() throws Exception { + public void testUnescapeCsvWriter() { checkCsvUnescapeWriter("foo.bar", "foo.bar"); checkCsvUnescapeWriter("foo,bar", "\"foo,bar\""); checkCsvUnescapeWriter("foo\nbar", "\"foo\nbar\""); http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/WordUtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/WordUtilsTest.java b/src/test/java/org/apache/commons/text/WordUtilsTest.java index 53684ae..7ba224c 100644 --- a/src/test/java/org/apache/commons/text/WordUtilsTest.java +++ b/src/test/java/org/apache/commons/text/WordUtilsTest.java @@ -508,14 +508,14 @@ public class WordUtilsTest { } @Test - public void testLANG673() throws Exception { + public void testLANG673() { assertThat(WordUtils.abbreviate("01 23 45 67 89", 0, 40, "")).isEqualTo("01"); assertThat(WordUtils.abbreviate("01 23 45 67 89", 10, 40, "")).isEqualTo("01 23 45 67"); assertThat(WordUtils.abbreviate("01 23 45 67 89", 40, 40, "")).isEqualTo("01 23 45 67 89"); } @Test - public void testLANG1292() throws Exception { + public void testLANG1292() { // Prior to fix, this was throwing StringIndexOutOfBoundsException WordUtils.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/FuzzyScoreTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/FuzzyScoreTest.java b/src/test/java/org/apache/commons/text/similarity/FuzzyScoreTest.java index 2261bd5..a6ca81f 100644 --- a/src/test/java/org/apache/commons/text/similarity/FuzzyScoreTest.java +++ b/src/test/java/org/apache/commons/text/similarity/FuzzyScoreTest.java @@ -30,7 +30,7 @@ public class FuzzyScoreTest { private static final FuzzyScore ENGLISH_SCORE = new FuzzyScore(Locale.ENGLISH); @Test - public void testGetFuzzyScore() throws Exception { + public void testGetFuzzyScore() { assertThat(ENGLISH_SCORE.fuzzyScore("", "")).isEqualTo(0); assertThat(ENGLISH_SCORE.fuzzyScore("Workshop", "b")).isEqualTo(0); assertThat(ENGLISH_SCORE.fuzzyScore("Room", "o")).isEqualTo(1); @@ -41,22 +41,22 @@ public class FuzzyScoreTest { } @Test(expected = IllegalArgumentException.class) - public void testGetFuzzyScore_StringNullLocale() throws Exception { + public void testGetFuzzyScore_StringNullLocale() { ENGLISH_SCORE.fuzzyScore("not null", null); } @Test(expected = IllegalArgumentException.class) - public void testGetFuzzyScore_NullStringLocale() throws Exception { + public void testGetFuzzyScore_NullStringLocale() { ENGLISH_SCORE.fuzzyScore(null, "not null"); } @Test(expected = IllegalArgumentException.class) - public void testGetFuzzyScore_NullNullLocale() throws Exception { + public void testGetFuzzyScore_NullNullLocale() { ENGLISH_SCORE.fuzzyScore(null, null); } @Test(expected = IllegalArgumentException.class) - public void testMissingLocale() throws Exception { + public void testMissingLocale() { new FuzzyScore((Locale) null); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/JaccardDistanceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/JaccardDistanceTest.java b/src/test/java/org/apache/commons/text/similarity/JaccardDistanceTest.java index e71aa78..c8e5c61 100644 --- a/src/test/java/org/apache/commons/text/similarity/JaccardDistanceTest.java +++ b/src/test/java/org/apache/commons/text/similarity/JaccardDistanceTest.java @@ -52,17 +52,17 @@ public class JaccardDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGettingJaccardDistanceNullNull() throws Exception { + public void testGettingJaccardDistanceNullNull() { classBeingTested.apply(null, null); } @Test(expected = IllegalArgumentException.class) - public void testGettingJaccardDistanceStringNull() throws Exception { + public void testGettingJaccardDistanceStringNull() { classBeingTested.apply(" ", null); } @Test(expected = IllegalArgumentException.class) - public void testGettingJaccardDistanceNullString() throws Exception { + public void testGettingJaccardDistanceNullString() { classBeingTested.apply(null, "right"); } } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/JaccardSimilarityTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/JaccardSimilarityTest.java b/src/test/java/org/apache/commons/text/similarity/JaccardSimilarityTest.java index 105e9f4..6bbbd2f 100644 --- a/src/test/java/org/apache/commons/text/similarity/JaccardSimilarityTest.java +++ b/src/test/java/org/apache/commons/text/similarity/JaccardSimilarityTest.java @@ -52,17 +52,17 @@ public class JaccardSimilarityTest { } @Test(expected = IllegalArgumentException.class) - public void testGettingJaccardSimilarityNullNull() throws Exception { + public void testGettingJaccardSimilarityNullNull() { classBeingTested.apply(null, null); } @Test(expected = IllegalArgumentException.class) - public void testGettingJaccardSimilarityStringNull() throws Exception { + public void testGettingJaccardSimilarityStringNull() { classBeingTested.apply(" ", null); } @Test(expected = IllegalArgumentException.class) - public void testGettingJaccardSimilarityNullString() throws Exception { + public void testGettingJaccardSimilarityNullString() { classBeingTested.apply(null, "right"); } } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/JaroWinklerDistanceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/JaroWinklerDistanceTest.java b/src/test/java/org/apache/commons/text/similarity/JaroWinklerDistanceTest.java index 9a19c36..1c94e7f 100644 --- a/src/test/java/org/apache/commons/text/similarity/JaroWinklerDistanceTest.java +++ b/src/test/java/org/apache/commons/text/similarity/JaroWinklerDistanceTest.java @@ -47,17 +47,17 @@ public class JaroWinklerDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGetJaroWinklerDistance_NullNull() throws Exception { + public void testGetJaroWinklerDistance_NullNull() { distance.apply(null, null); } @Test(expected = IllegalArgumentException.class) - public void testGetJaroWinklerDistance_StringNull() throws Exception { + public void testGetJaroWinklerDistance_StringNull() { distance.apply(" ", null); } @Test(expected = IllegalArgumentException.class) - public void testGetJaroWinklerDistance_NullString() throws Exception { + public void testGetJaroWinklerDistance_NullString() { distance.apply(null, "clear"); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java b/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java index 78f3b2b..a1a927c 100644 --- a/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java +++ b/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java @@ -138,12 +138,12 @@ public class LevenshteinDetailedDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDetailedDistance_NullString() throws Exception { + public void testGetLevenshteinDetailedDistance_NullString() { UNLIMITED_DISTANCE.apply("a", null); } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDetailedDistance_StringNull() throws Exception { + public void testGetLevenshteinDetailedDistance_StringNull() { UNLIMITED_DISTANCE.apply(null, "a"); } @@ -387,17 +387,17 @@ public class LevenshteinDetailedDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDetailedDistance_NullStringInt() throws Exception { + public void testGetLevenshteinDetailedDistance_NullStringInt() { UNLIMITED_DISTANCE.apply(null, "a"); } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDetailedDistance_StringNullInt() throws Exception { + public void testGetLevenshteinDetailedDistance_StringNullInt() { UNLIMITED_DISTANCE.apply("a", null); } @Test(expected = IllegalArgumentException.class) - public void testConstructorWithNegativeThreshold() throws Exception { + public void testConstructorWithNegativeThreshold() { new LevenshteinDetailedDistance(-1); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/LevenshteinDistanceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/LevenshteinDistanceTest.java b/src/test/java/org/apache/commons/text/similarity/LevenshteinDistanceTest.java index 65ee83b..3696810 100644 --- a/src/test/java/org/apache/commons/text/similarity/LevenshteinDistanceTest.java +++ b/src/test/java/org/apache/commons/text/similarity/LevenshteinDistanceTest.java @@ -42,12 +42,12 @@ public class LevenshteinDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDistance_NullString() throws Exception { + public void testGetLevenshteinDistance_NullString() { UNLIMITED_DISTANCE.apply("a", null); } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDistance_StringNull() throws Exception { + public void testGetLevenshteinDistance_StringNull() { UNLIMITED_DISTANCE.apply(null, "a"); } @@ -116,17 +116,17 @@ public class LevenshteinDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDistance_NullStringInt() throws Exception { + public void testGetLevenshteinDistance_NullStringInt() { UNLIMITED_DISTANCE.apply(null, "a"); } @Test(expected = IllegalArgumentException.class) - public void testGetLevenshteinDistance_StringNullInt() throws Exception { + public void testGetLevenshteinDistance_StringNullInt() { UNLIMITED_DISTANCE.apply("a", null); } @Test(expected = IllegalArgumentException.class) - public void testConstructorWithNegativeThreshold() throws Exception { + public void testConstructorWithNegativeThreshold() { new LevenshteinDistance(-1); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceDistanceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceDistanceTest.java b/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceDistanceTest.java index 516bac2..5345bdd 100644 --- a/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceDistanceTest.java +++ b/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceDistanceTest.java @@ -51,17 +51,17 @@ public class LongestCommonSubsequenceDistanceTest { } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceDistanceNullNull() throws Exception { + public void testGettingLongestCommonSubsequenceDistanceNullNull() { subject.apply(null, null); } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceDistanceStringNull() throws Exception { + public void testGettingLongestCommonSubsequenceDistanceStringNull() { subject.apply(" ", null); } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceDistanceNullString() throws Exception { + public void testGettingLongestCommonSubsequenceDistanceNullString() { subject.apply(null, "right"); } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceTest.java b/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceTest.java index 1b0efa5..7aace1f 100644 --- a/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceTest.java +++ b/src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceTest.java @@ -51,17 +51,17 @@ public class LongestCommonSubsequenceTest { } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceApplyNullNull() throws Exception { + public void testGettingLongestCommonSubsequenceApplyNullNull() { subject.apply(null, null); } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceApplyStringNull() throws Exception { + public void testGettingLongestCommonSubsequenceApplyStringNull() { subject.apply(" ", null); } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceApplyNullString() throws Exception { + public void testGettingLongestCommonSubsequenceApplyNullString() { subject.apply(null, "right"); } @@ -85,17 +85,17 @@ public class LongestCommonSubsequenceTest { } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceNullNull() throws Exception { + public void testGettingLongestCommonSubsequenceNullNull() { subject.longestCommonSubsequence(null, null); } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceStringNull() throws Exception { + public void testGettingLongestCommonSubsequenceStringNull() { subject.longestCommonSubsequence(" ", null); } @Test(expected = IllegalArgumentException.class) - public void testGettingLongestCommonSubsequenceNullString() throws Exception { + public void testGettingLongestCommonSubsequenceNullString() { subject.longestCommonSubsequence(null, "right"); } @@ -121,19 +121,19 @@ public class LongestCommonSubsequenceTest { @Test(expected = IllegalArgumentException.class) @Deprecated - public void testGettingLogestCommonSubsequenceNullNull() throws Exception { + public void testGettingLogestCommonSubsequenceNullNull() { subject.logestCommonSubsequence(null, null); } @Test(expected = IllegalArgumentException.class) @Deprecated - public void testGettingLogestCommonSubsequenceStringNull() throws Exception { + public void testGettingLogestCommonSubsequenceStringNull() { subject.logestCommonSubsequence(" ", null); } @Test(expected = IllegalArgumentException.class) @Deprecated - public void testGettingLogestCommonSubsequenceNullString() throws Exception { + public void testGettingLogestCommonSubsequenceNullString() { subject.logestCommonSubsequence(null, "right"); } } http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java b/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java index 8b67f6a..55d9c3f 100644 --- a/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java +++ b/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java @@ -31,14 +31,14 @@ import static org.assertj.core.api.Assertions.assertThat; public class AggregateTranslatorTest { @Test - public void testNullConstructor() throws Exception { + public void testNullConstructor() { final String testString = "foo"; final AggregateTranslator subject = new AggregateTranslator((CharSequenceTranslator[]) null); assertThat(subject.translate(testString)).isEqualTo(testString); } @Test - public void testNullVarargConstructor() throws Exception { + public void testNullVarargConstructor() { final String testString = "foo"; final AggregateTranslator subject = new AggregateTranslator((CharSequenceTranslator) null); assertThat(subject.translate(testString)).isEqualTo(testString);