refactor!: RegexTools 中使用 ArrayTools#isAllElementsNotNull 判断数组

BREAKING CHANGE: 数组为 `null` 时,不抛出 `NullPointerException`,而是 `IllegalArgumentException`。
This commit is contained in:
2025-04-02 14:28:59 +08:00
parent 7babf0953a
commit 9ad82bdb57
2 changed files with 9 additions and 22 deletions

View File

@@ -75,7 +75,7 @@ class RegexToolsTests {
@Test
void getPatterns_NullPatterns_ThrowsException() {
assertThrows(NullPointerException.class, () -> {
assertThrows(IllegalArgumentException.class, () -> {
RegexTools.getPatterns(null, true);
});
}