fix nullpointer exceptions

This commit is contained in:
Oliver Egger 2022-11-22 16:02:06 +01:00
parent bb8775bfdb
commit b3cc460ccd
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ public abstract class ParserBase {
if (!"id".equals(e.getName())) {
return true;
}
if (path.contains(".")) {
if (path!=null && path.contains(".")) {
return idPolicy.forInner();
} else {
return idPolicy.forRoot();

View File

@ -1680,7 +1680,7 @@ public class StructureMapUtilities {
case EVALUATE:
ExpressionNode expr = (ExpressionNode) tgt.getUserData(MAP_EXPRESSION);
if (expr == null) {
expr = fpe.parse(getParamStringNoNull(vars, tgt.getParameter().get(1), tgt.toString()));
expr = fpe.parse(getParamStringNoNull(vars, tgt.getParameter().get(tgt.getParameter().size() - 1), tgt.toString()));
tgt.setUserData(MAP_EXPRESSION, expr);
}
List<Base> v = fpe.evaluate(vars, null, null, tgt.getParameter().size() == 2 ? getParam(vars, tgt.getParameter().get(0)) : new BooleanType(false), expr);