garydgregory commented on a change in pull request #450: Add and use
IllegalArgumentExceptions
URL: https://github.com/apache/commons-lang/pull/450#discussion_r321344922
##########
File path: src/main/java/org/apache/commons/lang3/ArrayUtils.java
##########
@@ -5098,8 +5097,8 @@ public static boolean isNotEmpty(final boolean[] array) {
*/
final Class<?> type2 = array2.getClass().getComponentType();
if (!type1.isAssignableFrom(type2)) {
- throw new IllegalArgumentException("Cannot store " +
type2.getName() + " in an array of "
- + type1.getName(), ase);
+ throw IllegalArgumentExceptions.format(ase, "Cannot store %s
in an array of %s", type2.getName(),
+ type1.getName(), ase);
Review comment:
I will remove the last `ase`. The rest is correct, it is not the same, one
param is from `type2` and the next for `type1`.
----------------------------------------------------------------
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