Merge pull request #1001 from ahdis/oe_np_with_structuremaps
fix np and index out of bound exception
This commit is contained in:
commit
e189ae2b76
|
@ -228,7 +228,7 @@ public abstract class ParserBase {
|
||||||
if (!"id".equals(e.getName())) {
|
if (!"id".equals(e.getName())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (path.contains(".")) {
|
if (path!=null && path.contains(".")) {
|
||||||
return idPolicy.forInner();
|
return idPolicy.forInner();
|
||||||
} else {
|
} else {
|
||||||
return idPolicy.forRoot();
|
return idPolicy.forRoot();
|
||||||
|
|
|
@ -1680,7 +1680,7 @@ public class StructureMapUtilities {
|
||||||
case EVALUATE:
|
case EVALUATE:
|
||||||
ExpressionNode expr = (ExpressionNode) tgt.getUserData(MAP_EXPRESSION);
|
ExpressionNode expr = (ExpressionNode) tgt.getUserData(MAP_EXPRESSION);
|
||||||
if (expr == null) {
|
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);
|
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);
|
List<Base> v = fpe.evaluate(vars, null, null, tgt.getParameter().size() == 2 ? getParam(vars, tgt.getParameter().get(0)) : new BooleanType(false), expr);
|
||||||
|
|
Loading…
Reference in New Issue