You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/11/28 10:50:40 UTC
[commons-codec] 05/05: Fix javadoc errors in test classes.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit ff3f026094b8211c4ab372f22b669487d0a619b1
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Nov 28 10:49:59 2019 +0000
Fix javadoc errors in test classes.
---
.../codec/binary/Base32InputStreamTest.java | 9 +++++++
.../codec/binary/Base64InputStreamTest.java | 9 +++++++
.../commons/codec/language/Caverphone1Test.java | 8 +++---
.../commons/codec/language/Caverphone2Test.java | 18 +++++--------
.../codec/language/ColognePhoneticTest.java | 3 +--
.../codec/language/DaitchMokotoffSoundexTest.java | 3 +--
.../apache/commons/codec/language/NysiisTest.java | 30 ++++++++--------------
.../apache/commons/codec/language/SoundexTest.java | 9 +++----
.../codec/language/bm/BeiderMorseEncoderTest.java | 10 +++-----
9 files changed, 47 insertions(+), 52 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/binary/Base32InputStreamTest.java b/src/test/java/org/apache/commons/codec/binary/Base32InputStreamTest.java
index 4c149d5..e033741 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base32InputStreamTest.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base32InputStreamTest.java
@@ -144,6 +144,7 @@ public class Base32InputStreamTest {
* Tests skipping past the end of a stream.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testAvailable() throws Throwable {
@@ -380,6 +381,7 @@ public class Base32InputStreamTest {
* Tests markSupported.
*
* @throws Exception
+ * for some failure scenarios.
*/
@Test
public void testMarkSupported() throws Exception {
@@ -395,6 +397,7 @@ public class Base32InputStreamTest {
* Tests read returning 0
*
* @throws Exception
+ * for some failure scenarios.
*/
@Test
public void testRead0() throws Exception {
@@ -430,6 +433,7 @@ public class Base32InputStreamTest {
* Tests read throwing IndexOutOfBoundsException
*
* @throws Exception
+ * for some failure scenarios.
*/
@Test
public void testReadOutOfBounds() throws Exception {
@@ -472,6 +476,7 @@ public class Base32InputStreamTest {
* Tests skipping as a noop
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipNone() throws Throwable {
@@ -490,6 +495,7 @@ public class Base32InputStreamTest {
* Tests skipping number of characters larger than the internal buffer.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipBig() throws Throwable {
@@ -506,6 +512,7 @@ public class Base32InputStreamTest {
* Tests skipping past the end of a stream.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipPastEnd() throws Throwable {
@@ -523,6 +530,7 @@ public class Base32InputStreamTest {
* Tests skipping to the end of a stream.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipToEnd() throws Throwable {
@@ -540,6 +548,7 @@ public class Base32InputStreamTest {
* Tests if negative arguments to skip are handled correctly.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test(expected=IllegalArgumentException.class)
public void testSkipWrongArgument() throws Throwable {
diff --git a/src/test/java/org/apache/commons/codec/binary/Base64InputStreamTest.java b/src/test/java/org/apache/commons/codec/binary/Base64InputStreamTest.java
index 559ff2b..60dd122 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base64InputStreamTest.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base64InputStreamTest.java
@@ -153,6 +153,7 @@ public class Base64InputStreamTest {
* Tests skipping past the end of a stream.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testAvailable() throws Throwable {
@@ -393,6 +394,7 @@ public class Base64InputStreamTest {
* Tests markSupported.
*
* @throws Exception
+ * for some failure scenarios.
*/
@Test
public void testMarkSupported() throws Exception {
@@ -408,6 +410,7 @@ public class Base64InputStreamTest {
* Tests read returning 0
*
* @throws Exception
+ * for some failure scenarios.
*/
@Test
public void testRead0() throws Exception {
@@ -443,6 +446,7 @@ public class Base64InputStreamTest {
* Tests read throwing IndexOutOfBoundsException
*
* @throws Exception
+ * for some failure scenarios.
*/
@Test
public void testReadOutOfBounds() throws Exception {
@@ -485,6 +489,7 @@ public class Base64InputStreamTest {
* Tests skipping number of characters larger than the internal buffer.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipBig() throws Throwable {
@@ -501,6 +506,7 @@ public class Base64InputStreamTest {
* Tests skipping as a noop
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipNone() throws Throwable {
@@ -519,6 +525,7 @@ public class Base64InputStreamTest {
* Tests skipping past the end of a stream.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipPastEnd() throws Throwable {
@@ -536,6 +543,7 @@ public class Base64InputStreamTest {
* Tests skipping to the end of a stream.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test
public void testSkipToEnd() throws Throwable {
@@ -553,6 +561,7 @@ public class Base64InputStreamTest {
* Tests if negative arguments to skip are handled correctly.
*
* @throws Throwable
+ * for some failure scenarios.
*/
@Test(expected=IllegalArgumentException.class)
public void testSkipWrongArgument() throws Throwable {
diff --git a/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java b/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java
index c876d02..96e5586 100644
--- a/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java
+++ b/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java
@@ -39,7 +39,7 @@ public class Caverphone1Test extends StringEncoderAbstractTest<Caverphone1> {
*
* AT1111 words: add, aid, at, art, eat, earth, head, hit, hot, hold, hard, heart, it, out, old
*
- * @throws EncoderException
+ * @throws EncoderException for some failure scenarios.
*/
@Test
public void testCaverphoneRevisitedCommonCodeAT1111() throws EncoderException {
@@ -70,7 +70,7 @@ public class Caverphone1Test extends StringEncoderAbstractTest<Caverphone1> {
/**
* Tests some examples from version 2.0 http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
- * @throws EncoderException
+ * @throws EncoderException for some failure scenarios.
*/
@Test
public void testIsCaverphoneEquals() throws EncoderException {
@@ -82,7 +82,7 @@ public class Caverphone1Test extends StringEncoderAbstractTest<Caverphone1> {
/**
* Tests example from http://caversham.otago.ac.nz/files/working/ctp060902.pdf
*
- * @throws EncoderException
+ * @throws EncoderException for some failure scenarios.
*/
@Test
public void testSpecificationV1Examples() throws EncoderException {
@@ -93,7 +93,7 @@ public class Caverphone1Test extends StringEncoderAbstractTest<Caverphone1> {
/**
* Tests examples from http://en.wikipedia.org/wiki/Caverphone
*
- * @throws EncoderException
+ * @throws EncoderException for some failure scenarios.
*/
@Test
public void testWikipediaExamples() throws EncoderException {
diff --git a/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java b/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java
index 22e94b8..2a57c3f 100644
--- a/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java
+++ b/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java
@@ -39,8 +39,7 @@ public class Caverphone2Test extends StringEncoderAbstractTest<Caverphone2> {
*
* AT11111111 words: add, aid, at, art, eat, earth, head, hit, hot, hold, hard, heart, it, out, old
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedCommonCodeAT11111111() throws EncoderException {
this.checkEncodingVariations("AT11111111", new String[]{
@@ -64,8 +63,7 @@ public class Caverphone2Test extends StringEncoderAbstractTest<Caverphone2> {
/**
* See http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedExamples() throws EncoderException {
final String[][] data = {{"Stevenson", "STFNSN1111"}, {"Peter", "PTA1111111"}};
@@ -75,8 +73,7 @@ public class Caverphone2Test extends StringEncoderAbstractTest<Caverphone2> {
/**
* See http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomNameKLN1111111() throws EncoderException {
this.checkEncodingVariations("KLN1111111", new String[]{
@@ -167,8 +164,7 @@ public class Caverphone2Test extends StringEncoderAbstractTest<Caverphone2> {
/**
* See http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomNameTN11111111() throws EncoderException {
this.checkEncodingVariations("TN11111111", new String[]{
@@ -246,8 +242,7 @@ public class Caverphone2Test extends StringEncoderAbstractTest<Caverphone2> {
/**
* See http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomNameTTA1111111() throws EncoderException {
this.checkEncodingVariations("TTA1111111", new String[]{
@@ -324,8 +319,7 @@ public class Caverphone2Test extends StringEncoderAbstractTest<Caverphone2> {
/**
* See http://caversham.otago.ac.nz/files/working/ctp150804.pdf
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomWords() throws EncoderException {
this.checkEncodingVariations("RTA1111111", new String[]{"rather", "ready", "writer"});
diff --git a/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java b/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java
index 95e3bb1..ac109ae 100644
--- a/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java
+++ b/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java
@@ -115,8 +115,7 @@ public class ColognePhoneticTest extends StringEncoderAbstractTest<ColognePhonet
/**
* Tests [CODEC-122]
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testAychlmajrForCodec122() throws EncoderException {
this.checkEncoding("04567", "Aychlmajr");
diff --git a/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java b/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java
index 309a70c..ebf6012 100644
--- a/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java
+++ b/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java
@@ -89,8 +89,7 @@ public class DaitchMokotoffSoundexTest extends StringEncoderAbstractTest<DaitchM
/**
* Test data from http://www.myatt.demon.co.uk/sxalg.htm
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testEncodeIgnoreHyphens() throws EncoderException {
this.checkEncodingVariations("565463", new String[] { "KINGSMITH", "-KINGSMITH", "K-INGSMITH", "KI-NGSMITH",
diff --git a/src/test/java/org/apache/commons/codec/language/NysiisTest.java b/src/test/java/org/apache/commons/codec/language/NysiisTest.java
index 5362908..eacaef4 100644
--- a/src/test/java/org/apache/commons/codec/language/NysiisTest.java
+++ b/src/test/java/org/apache/commons/codec/language/NysiisTest.java
@@ -38,8 +38,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
* @param testValues
* an array of String pairs where each pair's first element is the input and the second element the
* expected encoding.
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
private void assertEncodings(final String[]... testValues) throws EncoderException {
for (final String[] arr : testValues) {
Assert.assertEquals("Problem with " + arr[0], arr[1], this.fullNysiis.encode(arr[0]));
@@ -83,8 +82,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
* Tests data gathered from around the internet.
*
* @see <a href="http://www.dropby.com/NYSIISTextStrings.html">http://www.dropby.com/NYSIISTextStrings.html</a>
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testDropBy() throws EncoderException {
// Explanation of differences between this implementation and the one at dropby.com is
@@ -151,8 +149,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests data gathered from around the internets.
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testOthers() throws EncoderException {
this.assertEncodings(
@@ -168,8 +165,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 1: Translate first characters of name: MAC → MCC, KN → N, K → C, PH, PF → FF, SCH → SSS
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule1() throws EncoderException {
this.assertEncodings(
@@ -184,8 +180,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 2: Translate last characters of name: EE → Y, IE → Y, DT, RT, RD, NT, ND → D
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule2() throws EncoderException {
this.assertEncodings(
@@ -201,8 +196,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 4.1: EV → AF else A, E, I, O, U → A
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule4Dot1() throws EncoderException {
this.assertEncodings(
@@ -217,8 +211,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 4.2: Q → G, Z → S, M → N
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule4Dot2() throws EncoderException {
this.assertEncodings(
@@ -230,8 +223,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 5: If last character is S, remove it.
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule5() throws EncoderException {
this.assertEncodings(
@@ -242,8 +234,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 6: If last characters are AY, replace with Y.
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule6() throws EncoderException {
this.assertEncodings(
@@ -254,8 +245,7 @@ public class NysiisTest extends StringEncoderAbstractTest<Nysiis> {
/**
* Tests rule 7: If last character is A, remove it.
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testRule7() throws EncoderException {
this.assertEncodings(
diff --git a/src/test/java/org/apache/commons/codec/language/SoundexTest.java b/src/test/java/org/apache/commons/codec/language/SoundexTest.java
index c9a6fec..92c8393 100644
--- a/src/test/java/org/apache/commons/codec/language/SoundexTest.java
+++ b/src/test/java/org/apache/commons/codec/language/SoundexTest.java
@@ -193,8 +193,7 @@ public class SoundexTest extends StringEncoderAbstractTest<Soundex> {
/**
* Test data from http://www.myatt.demon.co.uk/sxalg.htm
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testEncodeIgnoreHyphens() throws EncoderException {
this.checkEncodingVariations("K525", new String[]{
@@ -245,8 +244,7 @@ public class SoundexTest extends StringEncoderAbstractTest<Soundex> {
/**
* Consonants from the same code group separated by W or H are treated as one.
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testHWRuleEx3() throws EncoderException {
Assert.assertEquals("S460", this.getStringEncoder().encode("Sgler"));
@@ -286,8 +284,7 @@ public class SoundexTest extends StringEncoderAbstractTest<Soundex> {
* http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support
* /kb/articles/Q100/3/65.asp&NoWebContent=1
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testMsSqlServer2() throws EncoderException {
this.checkEncodingVariations("E625", new String[]{"Erickson", "Erickson", "Erikson", "Ericson", "Ericksen", "Ericsen"});
diff --git a/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java b/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
index 2134c5b..306bbc3 100644
--- a/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
+++ b/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
@@ -54,8 +54,7 @@ public class BeiderMorseEncoderTest extends StringEncoderAbstractTest<StringEnco
/**
* Tests we do not blow up.
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testAllChars() throws EncoderException {
final BeiderMorseEncoder bmpm = createGenericApproxEncoder();
@@ -102,8 +101,7 @@ public class BeiderMorseEncoderTest extends StringEncoderAbstractTest<StringEnco
* Tests https://issues.apache.org/jira/browse/CODEC-125?focusedCommentId=13071566&page=com.atlassian.jira.plugin.system.issuetabpanels:
* comment-tabpanel#comment-13071566
*
- * @throws EncoderException
- */
+ * @throws EncoderException for some failure scenarios */
@Test
public void testEncodeGna() throws EncoderException {
final BeiderMorseEncoder bmpm = createGenericApproxEncoder();
@@ -183,9 +181,9 @@ public class BeiderMorseEncoderTest extends StringEncoderAbstractTest<StringEnco
}
/**
- * (Un)luckily, the worse performing test because of the data in {@link #TEST_CHARS}
+ * (Un)luckily, the worse performing test because of the data in the test characters.
*
- * @throws EncoderException
+ * @throws EncoderException for some failure scenarios
*/
@Test(/* timeout = 20000L */)
public void testSpeedCheck() throws EncoderException {