You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/09/04 19:27:03 UTC

[GitHub] [commons-lang] garydgregory commented on a change in pull request #450: Add and use IllegalArgumentExceptions

garydgregory commented on a change in pull request #450: Add and use IllegalArgumentExceptions
URL: https://github.com/apache/commons-lang/pull/450#discussion_r320934200
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/CharUtils.java
 ##########
 @@ -219,7 +221,7 @@ public static char toChar(final String str, final char defaultValue) {
      */
     public static int toIntValue(final char ch) {
         if (!isAsciiNumeric(ch)) {
-            throw new IllegalArgumentException("The character " + ch + " is not in the range '0' - '9'");
+            throw IllegalArgumentExceptions.format("The character %s is not in the range '0' - '9'", ch);
 
 Review comment:
   I could be indeed but IIRC it does not matter since the result will be the same. Unless something interesting would happen related to Unicode.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services