Turan91 commented on issue #362: Add a check to StringUtils.repeat() for large length repeat value URL: https://github.com/apache/commons-lang/pull/362#issuecomment-448012492 It is convention for exception messages to provide the user with information on the cause of failure. In the same way an ArrayIndexOutOfBoundsException would provide the user with the length which caused it even though the "developer would clearly have access to that information." This provides the user with information on the offending value. With regards to overhead it is a single check at the start that doesn't add much overhead and prevents issues with both being too large and failing silently (with regards to the expected string not being what the users expects as a result).
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services