diff options
author | Dan Timoney <dt5972@att.com> | 2018-03-02 20:48:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-02 20:48:11 +0000 |
commit | 4023a8102388ad00afaf569e4d85c59bca2a33b8 (patch) | |
tree | c6e8468bc5019c06fdd1a2128caa3d7cdee57664 /sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java | |
parent | fa07ca221938a9d68c83a12192902121c67e2ecc (diff) | |
parent | 7d82b39d7007df02bdd050ed1d46111d29fa6ade (diff) |
Merge "Favor interfaces"
Diffstat (limited to 'sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java')
-rw-r--r-- | sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java index d0c052a1..dc7fad0a 100644 --- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java +++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SetNodeExecutor.java @@ -41,7 +41,7 @@ public class SetNodeExecutor extends SvcLogicNodeExecutor { .getLogger(SetNodeExecutor.class); @Override - public SvcLogicNode execute(SvcLogicServiceImpl svc, SvcLogicNode node, + public SvcLogicNode execute(SvcLogicService svc, SvcLogicNode node, SvcLogicContext ctx) throws SvcLogicException { String ifunsetStr = SvcLogicExpressionResolver.evaluate( @@ -60,16 +60,16 @@ public class SetNodeExecutor extends SvcLogicNodeExecutor { // Resolve LHS of assignment (could contain index variables) try { - //Backticks symbolize the variable should be handled as an expression instead of as a variable
- if (curName.trim().startsWith("`")) {
- int lastParen = curName.lastIndexOf("`");
- String evalExpr = curName.trim().substring(1, lastParen);
- SvcLogicExpression lhsExpr = SvcLogicExpressionFactory.parse(evalExpr);
- lhsVarName = SvcLogicExpressionResolver.evaluate(lhsExpr, node, ctx);
- } else {
+ //Backticks symbolize the variable should be handled as an expression instead of as a variable + if (curName.trim().startsWith("`")) { + int lastParen = curName.lastIndexOf("`"); + String evalExpr = curName.trim().substring(1, lastParen); + SvcLogicExpression lhsExpr = SvcLogicExpressionFactory.parse(evalExpr); + lhsVarName = SvcLogicExpressionResolver.evaluate(lhsExpr, node, ctx); + } else { SvcLogicExpression lhsExpr = SvcLogicExpressionFactory.parse(curName); lhsVarName = SvcLogicExpressionResolver.resolveVariableName(lhsExpr, node, ctx); - }
+ } } catch (Exception e) { LOG.warn("Caught exception trying to resolve variable name ("+curName+")", e); } |