alhudz commented on code in PR #1710:
URL: https://github.com/apache/commons-lang/pull/1710#discussion_r3421974689
##########
src/test/java/org/apache/commons/lang3/StringUtilsTest.java:
##########
@@ -2436,6 +2436,13 @@ void testSplitByWholeString_StringStringBoolean() {
for (int i = 0; i < splitWithMultipleSeparatorExpectedResults.length;
i++) {
assertEquals(splitWithMultipleSeparatorExpectedResults[i],
splitWithMultipleSeparator[i]);
}
+
+ // a trailing separator must not leak an empty token (it is dropped,
like leading and adjacent ones)
Review Comment:
Done. Moved them into a new `@ParameterizedTest`,
`testSplitByWholeStringDropsTrailingEmpty`, driven by `@CsvSource`. Each row
also asserts the preserve-all-tokens variant still keeps the trailing empty
token. Confirmed it fails on every row without the worker guard.
--
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]