This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push:
new 6f3eb814 No need to end exception messages with an exclamation!
6f3eb814 is described below
commit 6f3eb8142c4d35137dc529364a8ce5da484785a5
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Apr 15 08:24:14 2026 -0400
No need to end exception messages with an exclamation!
---
.../org/apache/commons/text/StrBuilderTest.java | 16 +++++------
.../apache/commons/text/StringEscapeUtilsTest.java | 32 +++++++++++-----------
.../apache/commons/text/StringSubstitutorTest.java | 2 +-
.../commons/text/lookup/XmlStringLookupTest.java | 2 +-
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/test/java/org/apache/commons/text/StrBuilderTest.java
b/src/test/java/org/apache/commons/text/StrBuilderTest.java
index 6d7de7e5..f112f106 100644
--- a/src/test/java/org/apache/commons/text/StrBuilderTest.java
+++ b/src/test/java/org/apache/commons/text/StrBuilderTest.java
@@ -286,31 +286,31 @@ class StrBuilderTest {
char[] array = new char[3];
try {
reader.read(array, -1, 0);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
try {
reader.read(array, 0, -1);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
try {
reader.read(array, 100, 1);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
try {
reader.read(array, 0, 100);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
try {
reader.read(array, Integer.MAX_VALUE, Integer.MAX_VALUE);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
@@ -1545,7 +1545,7 @@ class StrBuilderTest {
sb = new StrBuilder("aaxaaaayaa");
try {
sb.replace(StrMatcher.stringMatcher("aa"), "-", 2, 1, -1);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
@@ -1645,7 +1645,7 @@ class StrBuilderTest {
sb = new StrBuilder("aaxaaaayaa");
try {
sb.replace(StrMatcher.stringMatcher("aa"), "-", 11, sb.length(),
-1);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
@@ -1654,7 +1654,7 @@ class StrBuilderTest {
sb = new StrBuilder("aaxaaaayaa");
try {
sb.replace(StrMatcher.stringMatcher("aa"), "-", -1, sb.length(),
-1);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IndexOutOfBoundsException ex) {
// expected
}
diff --git a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
index bbebb0f1..aa3b27ea 100644
--- a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
@@ -156,17 +156,17 @@ class StringEscapeUtilsTest {
assertNull(StringEscapeUtils.escapeEcmaScript(null));
try {
StringEscapeUtils.ESCAPE_ECMASCRIPT.translate(null, null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
try {
StringEscapeUtils.ESCAPE_ECMASCRIPT.translate("", null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
@@ -271,17 +271,17 @@ class StringEscapeUtilsTest {
assertNull(StringEscapeUtils.escapeJava(null));
try {
StringEscapeUtils.ESCAPE_JAVA.translate(null, null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
try {
StringEscapeUtils.ESCAPE_JAVA.translate("", null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
@@ -323,17 +323,17 @@ class StringEscapeUtilsTest {
assertNull(StringEscapeUtils.escapeJson(null));
try {
StringEscapeUtils.ESCAPE_JSON.translate(null, null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
try {
StringEscapeUtils.ESCAPE_JSON.translate("", null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
@@ -534,17 +534,17 @@ class StringEscapeUtilsTest {
assertNull(StringEscapeUtils.unescapeJava(null));
try {
StringEscapeUtils.UNESCAPE_JAVA.translate(null, null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
try {
StringEscapeUtils.UNESCAPE_JAVA.translate("", null);
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IOException ex) {
- fail("Exception expected!");
+ fail("Exception expected.");
} catch (final IllegalArgumentException ex) {
// expected
}
diff --git a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
index 83544c94..c3391898 100644
--- a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
+++ b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
@@ -232,7 +232,7 @@ public class StringSubstitutorTest {
void testDetectsCyclicSubstitution() {
final Map<String, String> map = new HashMap<>();
map.put("name", "<name>");
- assertThrows(IllegalStateException.class, () ->
StringSubstitutor.replace("Hi <name>!", map, "<", ">"));
+ assertThrows(IllegalStateException.class, () ->
StringSubstitutor.replace("Hi <name>.", map, "<", ">"));
}
/**
diff --git
a/src/test/java/org/apache/commons/text/lookup/XmlStringLookupTest.java
b/src/test/java/org/apache/commons/text/lookup/XmlStringLookupTest.java
index 7327bca7..862fdf81 100644
--- a/src/test/java/org/apache/commons/text/lookup/XmlStringLookupTest.java
+++ b/src/test/java/org/apache/commons/text/lookup/XmlStringLookupTest.java
@@ -122,7 +122,7 @@ class XmlStringLookupTest {
@Test
void testMissingXPath() {
- assertThrows(IllegalArgumentException.class, () ->
XmlStringLookup.INSTANCE.apply(DOC_RELATIVE + ":!JUNK!"));
+ assertThrows(IllegalArgumentException.class, () ->
XmlStringLookup.INSTANCE.apply(DOC_RELATIVE + ":!JUNK."));
}
@Test