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

 ##########
 File path: src/main/java/org/apache/commons/lang3/Conversion.java
 ##########
 @@ -372,10 +374,11 @@ public static char binaryToHexDigitMsb0_4bits(final 
boolean[] src) {
      */
     public static char binaryToHexDigitMsb0_4bits(final boolean[] src, final 
int srcPos) {
         if (src.length > 8) {
-            throw new IllegalArgumentException("src.length>8: src.length=" + 
src.length);
+            throw IllegalArgumentExceptions.format("src.length>8: 
src.length=%,d");
         }
         if (src.length - srcPos < 4) {
-            throw new IllegalArgumentException("src.length-srcPos<4: 
src.length=" + src.length + ", srcPos=" + srcPos);
+            throw IllegalArgumentExceptions.format("src.length-srcPos<4: 
src.length=%,d, srcPos=%,d", src.length,
+                    srcPos);
 
 Review comment:
   Magic number 4

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to