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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new d68bf970b Javadoc
d68bf970b is described below
commit d68bf970beb14fa569e7e629c625ba48c01c2ddc
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Jan 19 20:39:54 2026 +0000
Javadoc
- Pick up one change from PR #1536
- Apply same change to the method that calls the above
---
src/changes/changes.xml | 1 +
src/main/java/org/apache/commons/lang3/StringUtils.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c098e1602..d90924a81 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -103,6 +103,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary
Gregory">Better exception messages from FastDateParser.parse(String).</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory,
David Du">Simplify NumberUtils.isParsable(String) #1570.</action>
<action type="fix" dev="ggregory" due-to="Gary
Gregory">RandomStringUtils.random() methods may not return when asked to
generate only letters or only numbers while provided with a range that contains
neither.</action>
+ <action type="fix" dev="ggregory" due-to="Gary Gregory,
Akshat Upadhyay">Fix Javadoc parameter comments in StringUtils.truncate()
methods #1536.</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary
Gregory">Add JavaVersion.JAVA_27.</action>
<action type="add" dev="ggregory" due-to="Gary
Gregory">Add SystemUtils.IS_JAVA_27.</action>
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index d276815cf..cb18f8f93 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -8829,7 +8829,7 @@ public static String trimToNull(final String str) {
* </pre>
*
* @param str the String to truncate, may be null.
- * @param maxWidth maximum length of result String, must be positive.
+ * @param maxWidth maximum length of result String, must be non-negative.
* @return truncated String, {@code null} if null String input.
* @throws IllegalArgumentException If {@code maxWidth} is less than
{@code 0}.
* @since 3.5
@@ -8891,7 +8891,7 @@ public static String truncate(final String str, final int
maxWidth) {
*
* @param str the String to truncate, may be null.
* @param offset left edge of source String.
- * @param maxWidth maximum length of result String, must be positive.
+ * @param maxWidth maximum length of result String, must be non-negative.
* @return truncated String, {@code null} if null String input.
* @throws IllegalArgumentException If {@code offset} or {@code maxWidth}
is less than {@code 0}.
* @since 3.5