elharo opened a new issue, #408:
URL: https://github.com/apache/maven-shared-utils/issues/408

   `StringUtils.leftPad` and `rightPad` with a `size` parameter and empty 
`delim` string cause `ArithmeticException` (division by zero) at lines 1116 and 
1150.
   
   Even with the documented `@throws ArithmeticException if delim is the empty 
String`, this is poor API behavior. An empty delimiter should simply result in 
no padding rather than crashing.
   
   Fix: return `str` unchanged when `delim.isEmpty()`.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to