elharo opened a new issue, #400:
URL: https://github.com/apache/maven-shared-utils/issues/400
`StringUtils.chompLast(@NonNull String str, @NonNull String sep)` (line 853)
computes `str.substring(str.length() - sep.length())` at line 857. If `sep` is
longer than `str`, the start index is negative, causing
`StringIndexOutOfBoundsException`.
For example: `chompLast("x", "ab")` throws.
Fix: add a guard returning `str` when `sep.length() > str.length()`.
--
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]