From beb8b5229b5c331094a07c9610d5218df2abbef5 Mon Sep 17 00:00:00 2001 From: ZWH266183351 <12242836+zwh266183351@user.noreply.gitee.com> Date: Tue, 27 Aug 2024 21:14:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=86=85=E9=83=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E8=87=AA=E5=AE=9A=E4=B9=89=E9=93=AD=E6=84=9F=E8=AF=8D?= =?UTF-8?q?=E5=92=8C=E7=99=BD=E5=90=8D=E5=8D=95=E8=AF=8D=E4=B8=BAnull?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD,=E9=98=B2=E6=AD=A2=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=B1=BB=E4=BC=BCIssue#72=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../houbb/sensitive/word/support/allow/WordAllowInit.java | 3 +++ .../github/houbb/sensitive/word/support/deny/WordDenyInit.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/github/houbb/sensitive/word/support/allow/WordAllowInit.java b/src/main/java/com/github/houbb/sensitive/word/support/allow/WordAllowInit.java index 6803637..a7c5f92 100644 --- a/src/main/java/com/github/houbb/sensitive/word/support/allow/WordAllowInit.java +++ b/src/main/java/com/github/houbb/sensitive/word/support/allow/WordAllowInit.java @@ -34,6 +34,9 @@ public abstract class WordAllowInit implements IWordAllow { List wordAllows = pipeline.list(); for (IWordAllow wordAllow : wordAllows) { List allowList = wordAllow.allow(); + if (allowList == null) { + allowList = new ArrayList<>(); + } results.addAll(allowList); } diff --git a/src/main/java/com/github/houbb/sensitive/word/support/deny/WordDenyInit.java b/src/main/java/com/github/houbb/sensitive/word/support/deny/WordDenyInit.java index 0fa64c2..6aa67cf 100644 --- a/src/main/java/com/github/houbb/sensitive/word/support/deny/WordDenyInit.java +++ b/src/main/java/com/github/houbb/sensitive/word/support/deny/WordDenyInit.java @@ -35,6 +35,9 @@ public abstract class WordDenyInit implements IWordDeny { List wordDenies = pipeline.list(); for (IWordDeny wordDeny : wordDenies) { List denyList = wordDeny.deny(); + if (denyList == null) { + denyList = new ArrayList<>(); + } results.addAll(denyList); }