garydgregory commented on a change in pull request #450: Add and use
IllegalArgumentExceptions
URL: https://github.com/apache/commons-lang/pull/450#discussion_r321339675
##########
File path: src/main/java/org/apache/commons/lang3/ArrayUtils.java
##########
@@ -267,15 +268,13 @@ public static boolean isEquals(final Object array1,
final Object array2) {
} else if (object instanceof Object[]) {
final Object[] entry = (Object[]) object;
if (entry.length < 2) {
- throw new IllegalArgumentException("Array element " + i +
", '"
- + object
- + "', has a length less than 2");
+ throw IllegalArgumentExceptions.format("Array element %,d,
'%s', has a length less than 2", i,
+ object);
Review comment:
Hi @sebbASF ,
One of the reasons for the new API is to use rich formatting, so why loose
the comma-separated format since it is much easier for humans to read?
----------------------------------------------------------------
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