ソースを参照

word替换的问题

huZhiHao 5 年 前
コミット
865d10df32
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/main/java/platform/common/util/BokeWordUtils.java

+ 2 - 1
src/main/java/platform/common/util/BokeWordUtils.java

@@ -261,7 +261,8 @@ public class BokeWordUtils {
             String key = "${"+textSet.getKey()+"}";
             if(value.indexOf(key)!= -1){
                 // value = textSet.getValue();//全部参数替换
-                value = value.replace(key, textSet.getValue());//仅替换参数
+                if(value != null && textSet != null)
+                    value = value.replace(key, textSet.getValue());//仅替换参数
             }
         }
         //模板未匹配到区域替换为空