From 31252640fff84fb2351696105751eae4f3240ed2 Mon Sep 17 00:00:00 2001 From: ezhil Date: Fri, 30 Nov 2018 18:28:29 +0530 Subject: Fixed Sonar issue in DeleteNodeExecutor.java Replaced litrals with constant Issue-ID: CCSDK-776 Change-Id: I58c02ec0ee78e9e4b852aa11266dc720fffbd172 Signed-off-by: ezhil --- .../org/onap/ccsdk/sli/core/sli/provider/DeleteNodeExecutor.java | 7 ++++--- 1 file 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); -- cgit 1.2.3-korg