aboutsummaryrefslogtreecommitdiffstats
path: root/sli
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-12-14 19:36:07 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-12-14 19:36:15 +0530
commit730601eb8281b7ad6aade500b8a54e6273dc5e53 (patch)
treea397f77c01ac59a6d770b5b4647d4b585c5d0955 /sli
parent6dd2c1b07cc306750dd9ee93cf8bb2f615f076aa (diff)
fixed sonar issues in ConfigureNodeExecutor.java
fixed sonar issue Issue-ID: CCSDK-525 Change-Id: Iec7548e3ab6480589cd80118730d0478cd71d707 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'sli')
-rw-r--r--sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/ConfigureNodeExecutor.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/ConfigureNodeExecutor.java b/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/ConfigureNodeExecutor.java
index 5b1d9efe..7ffdfcaf 100644
--- a/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/ConfigureNodeExecutor.java
+++ b/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/ConfigureNodeExecutor.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -37,6 +39,7 @@ import org.slf4j.LoggerFactory;
public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
private static final Logger LOG = LoggerFactory
.getLogger(ConfigureNodeExecutor.class);
+ private static final String CAUGHT_EXCEPTION_MSG="Caught exception from ";
public SvcLogicNode execute(SvcLogicServiceBase svc, SvcLogicNode node,
SvcLogicContext ctx) throws SvcLogicException {
@@ -58,7 +61,7 @@ public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
String key = SvcLogicExpressionResolver.evaluate(
node.getAttribute("key"), node, ctx);
- Map<String, String> parmMap = new HashMap<String, String>();
+ Map<String, String> parmMap = new HashMap<>();
Set<Map.Entry<String, SvcLogicExpression>> parmSet = node
.getParameterSet();
@@ -83,7 +86,7 @@ public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
try {
confStatus = adaptor.configure(key, parmMap, ctx);
} catch (Exception e) {
- LOG.warn("Caught exception from "+adaptorName+".configure", e);
+ LOG.warn(CAUGHT_EXCEPTION_MSG+adaptorName+".configure", e);
confStatus = SvcLogicAdaptor.ConfigStatus.FAILURE;
}
@@ -98,7 +101,7 @@ public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
activateStatus = adaptor.activate(key, ctx);
} catch (Exception e) {
- LOG.warn("Caught exception from "+adaptorName+".activate", e);
+ LOG.warn(CAUGHT_EXCEPTION_MSG+adaptorName+".activate", e);
activateStatus = SvcLogicAdaptor.ConfigStatus.FAILURE;
}
switch (activateStatus) {
@@ -124,7 +127,7 @@ public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
deactivateStatus = adaptor.deactivate(key, ctx);
} catch (Exception e) {
- LOG.warn("Caught exception from "+adaptorName+".deactivate", e);
+ LOG.warn(CAUGHT_EXCEPTION_MSG+adaptorName+".deactivate", e);
deactivateStatus = SvcLogicAdaptor.ConfigStatus.FAILURE;
}
switch (deactivateStatus) {
@@ -166,7 +169,7 @@ public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
try {
activateStatus = adaptor.activate(key, ctx);
} catch (Exception e) {
- LOG.warn("Caught exception from "+adaptorName+".activate", e);
+ LOG.warn(CAUGHT_EXCEPTION_MSG+adaptorName+".activate", e);
activateStatus = SvcLogicAdaptor.ConfigStatus.FAILURE;
}
switch (activateStatus) {
@@ -192,7 +195,7 @@ public class ConfigureNodeExecutor extends AbstractSvcLogicNodeExecutor {
try {
deactivateStatus = adaptor.deactivate(key, ctx);
} catch (Exception e) {
- LOG.warn("Caught exception from "+adaptorName+".deactivate", e);
+ LOG.warn(CAUGHT_EXCEPTION_MSG+adaptorName+".deactivate", e);
deactivateStatus = SvcLogicAdaptor.ConfigStatus.FAILURE;
}
switch (deactivateStatus) {