summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorezhil <ezhrajam@in.ibm.com>2018-11-30 18:28:29 +0530
committerezhil <ezhrajam@in.ibm.com>2018-11-30 18:29:33 +0530
commit31252640fff84fb2351696105751eae4f3240ed2 (patch)
tree241cbe1261bd05b7d066de3154f01919446167b2
parent72878d5a7aa2e830e4c08743005dc00613d26938 (diff)
Fixed Sonar issue in DeleteNodeExecutor.java
Replaced litrals with constant Issue-ID: CCSDK-776 Change-Id: I58c02ec0ee78e9e4b852aa11266dc720fffbd172 Signed-off-by: ezhil <ezhrajam@in.ibm.com>
-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 571dd37cd..18f1ce9a7 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);