Adding a constant to remove duplicate string 97/65997/1
authorSooriyaa <soponraj@in.ibm.com>
Wed, 12 Sep 2018 07:24:45 +0000 (12:54 +0530)
committerSooriyaa <soponraj@in.ibm.com>
Wed, 12 Sep 2018 07:25:05 +0000 (12:55 +0530)
Adding a constant to remove duplicate string

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

index fa006c1..64f5968 100644 (file)
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 public class HttpsRest extends HttpBaseRest {
 
     private static final Logger LOG = LoggerFactory.getLogger(HttpsRest.class);
+    private static final String UNSUPPORTED_EXCEPTION = "UnsupportedEncodingException: ";
 
     public void initHttpsRest() {
         SslContextFactory sslContextFactory = new SslContextFactory();
@@ -187,7 +188,7 @@ public class HttpsRest extends HttpBaseRest {
                         "request is expierd: " + RestHttpContentExchange.toState(HttpExchange.STATUS_EXPIRED));
             }
         } catch(UnsupportedEncodingException e) {
-           LOG.error("UnsupportedEncodingException: ",e);
+           LOG.error(UNSUPPORTED_EXCEPTION,e);
         } catch(Exception e) {//if not specific handling, no use of InterruptedException
            LOG.error("InterruptedException: ",e);
         }
@@ -229,7 +230,7 @@ public class HttpsRest extends HttpBaseRest {
                         "request is expierd: " + RestHttpContentExchange.toState(HttpExchange.STATUS_EXPIRED));
             }
         } catch(UnsupportedEncodingException e) {
-           LOG.error("UnsupportedEncodingException: ",e);
+           LOG.error(UNSUPPORTED_EXCEPTION,e);
         } catch(Exception e) {
            LOG.error("Exception: ",e);
         }
@@ -279,7 +280,7 @@ public class HttpsRest extends HttpBaseRest {
                         "request is expierd: " + RestHttpContentExchange.toState(HttpExchange.STATUS_EXPIRED));
             }
         } catch(UnsupportedEncodingException e) {
-           LOG.error("UnsupportedEncodingException: ",e);
+           LOG.error(UNSUPPORTED_EXCEPTION,e);
         } catch(Exception e) {
            LOG.error("Exception: ",e);
         }