garydgregory commented on a change in pull request #450: Add and use
IllegalArgumentExceptions
URL: https://github.com/apache/commons-lang/pull/450#discussion_r321342956
##########
File path: src/main/java/org/apache/commons/lang3/StringUtils.java
##########
@@ -6654,10 +6656,8 @@ private static String replaceEach(
// make sure lengths are ok, these need to be equal
if (searchLength != replacementLength) {
- throw new IllegalArgumentException("Search and Replace array
lengths don't match: "
- + searchLength
- + " vs "
- + replacementLength);
+ throw IllegalArgumentExceptions.format("Search and Replace array
lengths don't match: %s vs %s",
+ searchLength, replacementLength);
Review comment:
I will use `"Search and Replace array lengths don't match: %,d vs %,d"`
----------------------------------------------------------------
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