From 954ade4c1ae2adc0aaac3a1dbe800495c519520c Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sat, 18 Feb 2017 14:49:42 +0100 Subject: [PATCH] (doc) Use the full alphabet for the well-known example text. This change adds the missing `s` character. Signed-off-by: Tobias Gesellchen --- .../org/apache/commons/lang3/text/StrSubstitutor.java | 8 ++++---- .../java/org/apache/commons/lang3/StringUtilsTest.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java index 1a5662019..051cb5d89 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java +++ b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java @@ -52,13 +52,13 @@ import org.apache.commons.lang3.StringUtils; * Map valuesMap = HashMap(); * valuesMap.put("animal", "quick brown fox"); * valuesMap.put("target", "lazy dog"); - * String templateString = "The ${animal} jumped over the ${target}."; + * String templateString = "The ${animal} jumps over the ${target}."; * StrSubstitutor sub = new StrSubstitutor(valuesMap); * String resolvedString = sub.replace(templateString); * * yielding: *
- *      The quick brown fox jumped over the lazy dog.
+ *      The quick brown fox jumps over the lazy dog.
  * 
*

* Also, this class allows to set a default value for unresolved variables. @@ -72,13 +72,13 @@ import org.apache.commons.lang3.StringUtils; * Map valuesMap = HashMap(); * valuesMap.put("animal", "quick brown fox"); * valuesMap.put("target", "lazy dog"); - * String templateString = "The ${animal} jumped over the ${target}. ${undefined.number:-1234567890}."; + * String templateString = "The ${animal} jumps over the ${target}. ${undefined.number:-1234567890}."; * StrSubstitutor sub = new StrSubstitutor(valuesMap); * String resolvedString = sub.replace(templateString); * * yielding: *

- *      The quick brown fox jumped over the lazy dog. 1234567890.
+ *      The quick brown fox jumps over the lazy dog. 1234567890.
  * 
*

* In addition to this usage pattern there are some static convenience methods that diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index af84f4023..4c136ec18 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -2940,7 +2940,7 @@ public class StringUtilsTest { */ @Test public void testToString() throws UnsupportedEncodingException { - final String expectedString = "The quick brown fox jumped over the lazy dog."; + final String expectedString = "The quick brown fox jumps over the lazy dog."; byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset()); // sanity check start assertArrayEquals(expectedBytes, expectedString.getBytes()); @@ -3087,7 +3087,7 @@ public class StringUtilsTest { */ @Test public void testToEncodedString() { - final String expectedString = "The quick brown fox jumped over the lazy dog."; + final String expectedString = "The quick brown fox jumps over the lazy dog."; String encoding = SystemUtils.FILE_ENCODING; byte[] expectedBytes = expectedString.getBytes(Charset.defaultCharset()); // sanity check start