summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle
diff options
context:
space:
mode:
authordinesha <dineshgs@in.ibm.com>2019-07-31 14:40:52 +0530
committerTakamune Cho <takamune.cho@att.com>2019-08-13 19:02:56 +0000
commit41f765bacfbf65230234e0318d75c09aabc26b7e (patch)
tree2818aade627e3866b68d56eb7771f338ac23bfb5 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle
parent13c345b2951cdccf549f4aead195e19e2b50725e (diff)
Sonar Fix- ProviderOperation.java
Fixed Sonar Issues accross the file Issue-ID: APPC-1669 Change-Id: Idccc7e133a93f0af8d2352473d95f755f39f1ae7 Signed-off-by: dinesha <dineshgs@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/base/ProviderOperation.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/base/ProviderOperation.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/base/ProviderOperation.java
index 7c16cb5cd..fc60f686a 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/base/ProviderOperation.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/base/ProviderOperation.java
@@ -61,6 +61,7 @@ import org.slf4j.MDC;
public abstract class ProviderOperation implements IProviderOperation {
+ private static final String palos = "PALOS";
private static final EELFLogger logger = EELFManager.getInstance().getLogger(ProviderOperation.class);
protected static final Configuration configuration = ConfigurationFactory.getConfiguration();
@@ -209,9 +210,9 @@ public abstract class ProviderOperation implements IProviderOperation {
protected void doFailure(RequestContext rc, HttpStatus code, String message, Throwable cause) throws APPCException {
SvcLogicContext svcLogic = rc.getSvcLogicContext();
String msg = (message == null) ? code.getReasonPhrase() : message;
- if ((msg.contains("PALOS"))) {
- msg = msg.substring(msg.indexOf("PALOS"), msg.length());
- msg = msg.substring(msg.indexOf("PALOS"), msg.indexOf("\n"));
+ if ((msg.contains(palos))) {
+ msg = msg.substring(msg.indexOf(palos), msg.length());
+ msg = msg.substring(msg.indexOf(palos), msg.indexOf("\n"));
} else {
if (msg.contains("\n")) {
msg = msg.substring(0, msg.indexOf('\n'));