From b6880474c3e6564ed47beccfe5658cf696efa7c2 Mon Sep 17 00:00:00 2001 From: liuyuefeng Date: Mon, 18 Dec 2023 10:47:12 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/java3y/austin/support/utils/ContentHolderUtil.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/austin-support/src/main/java/com/java3y/austin/support/utils/ContentHolderUtil.java b/austin-support/src/main/java/com/java3y/austin/support/utils/ContentHolderUtil.java index 56c4698..c1b8cd3 100644 --- a/austin-support/src/main/java/com/java3y/austin/support/utils/ContentHolderUtil.java +++ b/austin-support/src/main/java/com/java3y/austin/support/utils/ContentHolderUtil.java @@ -5,6 +5,7 @@ import org.springframework.util.PropertyPlaceholderHelper; import java.text.MessageFormat; import java.util.Map; +import java.util.Objects; /** * @author 3y @@ -43,6 +44,10 @@ public class ContentHolderUtil { @Override public String resolvePlaceholder(String placeholderName) { + if (Objects.isNull(paramMap)) { + String errorStr = MessageFormat.format("template:{0} require param:{1},but not exist! paramMap:{2}", template, placeholderName, paramMap); + throw new IllegalArgumentException(errorStr); + } String value = paramMap.get(placeholderName); if (StringUtils.isEmpty(value)) { String errorStr = MessageFormat.format("template:{0} require param:{1},but not exist! paramMap:{2}", template, placeholderName, paramMap);