Skip to content

Commit 875da8f

Browse files
committed
[LANG-1798] In the unit test testCountMatches_char of
StringUtilsSubstringTest, one of the assertions is calling the wrong overload of countMatches
1 parent 777b2a1 commit 875da8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/apache/commons/lang3/StringUtilsSubstringTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ void testCountMatches_char() {
3737
assertEquals(0, StringUtils.countMatches(null, 'D'));
3838
assertEquals(5, StringUtils.countMatches("one long someone sentence of one", ' '));
3939
assertEquals(6, StringUtils.countMatches("one long someone sentence of one", 'o'));
40-
assertEquals(4, StringUtils.countMatches("oooooooooooo", "ooo"));
40+
// NUL char
41+
assertEquals(0, StringUtils.countMatches("oooooooooooo", '\0'));
4142
}
4243

4344
@Test

0 commit comments

Comments
 (0)