aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-11-30 23:31:27 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-30 23:31:27 +0000
commita8ba189dac17a5627e6e1cf102e63e7f9f29e8e1 (patch)
treecb9915b6f2c0c3c2fc18b4f58382fb2ccfdca828
parent89d5d1270bfb07eacba1591d2e0f034ad6bff5ee (diff)
parent31252640fff84fb2351696105751eae4f3240ed2 (diff)
Merge "Fixed Sonar issue in DeleteNodeExecutor.java"
-rw-r--r--sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/DeleteNodeExecutor.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/DeleteNodeExecutor.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/DeleteNodeExecutor.java
index 571dd37c..18f1ce9a 100644
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/DeleteNodeExecutor.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/DeleteNodeExecutor.java
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
public class DeleteNodeExecutor extends SvcLogicNodeExecutor {
private static final Logger LOG = LoggerFactory.getLogger(DeleteNodeExecutor.class);
+ private static final String FAILURE="failure";
@Override
public SvcLogicNode execute(SvcLogicService svc, SvcLogicNode node, SvcLogicContext ctx)
@@ -40,7 +41,7 @@ public class DeleteNodeExecutor extends SvcLogicNodeExecutor {
String resourceType = SvcLogicExpressionResolver.evaluate(node.getAttribute("resource"), node, ctx);
String key = SvcLogicExpressionResolver.evaluateAsKey(node.getAttribute("key"), node, ctx);
- String outValue = "failure";
+ String outValue = FAILURE;
if (LOG.isDebugEnabled()) {
LOG.debug("delete node encountered - looking for resource class " + plugin);
@@ -58,11 +59,11 @@ public class DeleteNodeExecutor extends SvcLogicNodeExecutor {
break;
case FAILURE:
default:
- outValue = "failure";
+ outValue = FAILURE;
}
} catch (SvcLogicException e) {
LOG.error("Caught exception from resource plugin", e);
- outValue = "failure";
+ outValue = FAILURE;
}
} else {
LOG.warn("Could not find SvcLogicResource object for plugin " + plugin);