各种空指针 bugfix 及 优化

This commit is contained in:
2025-02-13 11:00:21 +08:00
parent 3f42770cd6
commit 16cf3dcd2d
2 changed files with 42 additions and 9 deletions

View File

@@ -157,8 +157,13 @@ public class JevalUtil {
}
//2代表字符串
if(value == 2){
String variableValue = CommonConst.SYMBOL_SINGLE_QUOTA+variablesMap.get(key).toString()+CommonConst.SYMBOL_SINGLE_QUOTA;
variablesMap.put(key, variableValue);
// 20250213 空指针修复
// String variableValue = CommonConst.SYMBOL_SINGLE_QUOTA+variablesMap.get(key).toString()+CommonConst.SYMBOL_SINGLE_QUOTA;
Object v = variablesMap.get(key);
if(v!=null) {
String variableValue = CommonConst.SYMBOL_SINGLE_QUOTA+v.toString()+CommonConst.SYMBOL_SINGLE_QUOTA;
variablesMap.put(key, variableValue);
}
}
}
}