summaryrefslogtreecommitdiffstats
path: root/bpmn/MSORESTClient
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-09-12 16:13:47 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-09-12 16:13:47 +0530
commit171ec7b74a11658277f9e9fe1dcc893a8225db9e (patch)
tree8f475fddfc39f1639ee17b77545a1fbada48ed44 /bpmn/MSORESTClient
parent92ffbb4a56b1f84ed130b04ca3a9954ce610a02a (diff)
Fix for SONAR critical issues
Issue-Id : SO-117 Change-Id: Icdc64605b475e20af7e871135af327f7d0e38792 Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'bpmn/MSORESTClient')
-rw-r--r--bpmn/MSORESTClient/pom.xml5
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java8
2 files changed, 11 insertions, 2 deletions
diff --git a/bpmn/MSORESTClient/pom.xml b/bpmn/MSORESTClient/pom.xml
index b042a9e82c..1bcb3b705d 100644
--- a/bpmn/MSORESTClient/pom.xml
+++ b/bpmn/MSORESTClient/pom.xml
@@ -35,6 +35,11 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.openecomp.so</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
<finalName>MSORESTClient</finalName>
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
index 259f3d4075..6504615f7a 100644
--- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,6 +55,7 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.AbstractHttpMessage;
import org.apache.http.util.EntityUtils;
+import org.openecomp.mso.logger.MsoLogger;
/**
* Client used to send RESTFul requests.
* <p>
@@ -82,6 +84,8 @@ import org.apache.http.util.EntityUtils;
* @since 1.0
*/
public class RESTClient {
+
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
private final String proxyHost;
private final int proxyPort;
@@ -166,8 +170,7 @@ public class RESTClient {
}
}
} catch (UnsupportedEncodingException e) {
- // should not occur
- e.printStackTrace();
+ LOGGER.debug("Exception :", e);
}
return sb.toString();
}
@@ -197,6 +200,7 @@ public class RESTClient {
clientBuilder = HttpClientBuilder.create().setConnectionManager(
manager);
} catch (Exception ex) {
+ LOGGER.debug("Exception :", ex);
throw new RESTException(ex.getMessage());
}
clientBuilder.disableRedirectHandling();