This is an automated email from the ASF dual-hosted git repository.
garydgregory 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 86401ab86 [javadoc] Correct CharUtils default-value conversion
descriptions (#1816)
86401ab86 is described below
commit 86401ab86e2a752f2d0452e72ed2dfd6f53de12b
Author: Tarun Kishore <[email protected]>
AuthorDate: Thu Oct 15 04:42:47 2026 +0530
[javadoc] Correct CharUtils default-value conversion descriptions (#1816)
* [javadoc] Correct CharUtils default-value conversion descriptions
The toIntValue overloads accepting a default return that value for
non-ASCII-numeric characters. Describe the fallback instead of incorrectly
promising an exception.
Co-authored-by: OpenAI Codex <[email protected]>
* [javadoc] Specify the ASCII digit range for default conversions
Clarify both default-value toIntValue overloads accept digits '0' to '9',
addressing the review's wording ambiguity.
Co-authored-by: OpenAI Codex <[email protected]>
* [javadoc] Use the primitive return type in conversion descriptions
Describe the default-value overloads as returning int rather than Integer,
matching their signatures and addressing review feedback.
Co-authored-by: OpenAI Codex <[email protected]>
---------
Co-authored-by: OpenAI Codex <[email protected]>
---
src/main/java/org/apache/commons/lang3/CharUtils.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/CharUtils.java
b/src/main/java/org/apache/commons/lang3/CharUtils.java
index 5930cea44..c9398b3ba 100644
--- a/src/main/java/org/apache/commons/lang3/CharUtils.java
+++ b/src/main/java/org/apache/commons/lang3/CharUtils.java
@@ -460,8 +460,8 @@ public static int toIntValue(final char ch) {
}
/**
- * Converts the character to the Integer it represents, throwing an
- * exception if the character is not numeric.
+ * Converts the character to the {@code int} it represents, returning the
+ * default value if the character is not an ASCII digit ({@code '0'} to
{@code '9'}).
*
* <p>
* This method converts the char '1' to the int 1 and so on.
@@ -504,8 +504,8 @@ public static int toIntValue(final Character ch) {
}
/**
- * Converts the character to the Integer it represents, throwing an
- * exception if the character is not numeric.
+ * Converts the character to the {@code int} it represents, returning the
+ * default value if the character is not an ASCII digit ({@code '0'} to
{@code '9'}).
*
* <p>
* This method converts the char '1' to the int 1 and so on.