commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] Turan91 commented on issue #362: Add a check to StringUtils.repeat() for large length repeat value
Date Mon, 17 Dec 2018 21:53:18 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message