Fixing sonar issue in HttpsRest.java 25/66925/1
authorSooriyaa <soponraj@in.ibm.com>
Mon, 17 Sep 2018 08:56:00 +0000 (14:26 +0530)
committerSooriyaa <soponraj@in.ibm.com>
Mon, 17 Sep 2018 08:56:11 +0000 (14:26 +0530)
Fixing sonar issue in HttpsRest.java

Issue-ID: VFC-1134
Change-Id: Icd1ce2aa6ec571d8ee68a61bee09fe02bb3dacfa
Signed-off-by: Sooriyaa <soponraj@in.ibm.com>
ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/util/restclient/HttpsRest.java

index cc64ca1..89b207b 100644 (file)
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 public class HttpsRest extends HttpBaseRest {
 
     private static final Logger LOG = LoggerFactory.getLogger(HttpsRest.class);
+    public static final String IOEXCEPTION = "IOException";
 
     public void initHttpsRest() {
         SslContextFactory sslContextFactory = new SslContextFactory();
@@ -187,7 +188,7 @@ public class HttpsRest extends HttpBaseRest {
         try {
             client.send(exchange);
         } catch(IOException e) {
-            LOG.error("IOException", e);
+            LOG.error(IOEXCEPTION, e);
         }
         try {
             int exchangeState = exchange.waitForDone();
@@ -230,7 +231,7 @@ public class HttpsRest extends HttpBaseRest {
         try {
             client.send(exchange);
         } catch(IOException e) {
-            LOG.error("IOException", e);
+            LOG.error(IOEXCEPTION, e);
         }
 
         try {
@@ -282,7 +283,7 @@ public class HttpsRest extends HttpBaseRest {
         try {
             client.send(exchange);
         } catch(IOException e) {
-            LOG.error("IOException", e);
+            LOG.error(IOEXCEPTION, e);
         }
 
         try {