Copilot commented on code in PR #1816:
URL: https://github.com/apache/commons-lang/pull/1816#discussion_r4272417625
##########
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 Integer it represents, returning the
+ * default value if the character is not an ASCII digit ({@code '0'} to
{@code '9'}).
Review Comment:
This Javadoc still says the character is converted to an \"Integer\", but
the method returns a primitive `int`. Consider changing \"Integer\" to \"int\"
to avoid implying boxing/a nullable return type.
##########
src/main/java/org/apache/commons/lang3/CharUtils.java:
##########
@@ -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 Integer it represents, returning the
+ * default value if the character is not an ASCII digit ({@code '0'} to
{@code '9'}).
Review Comment:
Same as above: the method returns `int`, not `Integer`. Updating the wording
to \"int\" would make the Javadoc consistent with the signature and avoid
confusion for API consumers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]