From 875c88e21a9e6e41e72231a841878149f2623127 Mon Sep 17 00:00:00 2001 From: Sooriyaa Date: Wed, 12 Sep 2018 12:54:45 +0530 Subject: Adding a constant to remove duplicate string Adding a constant to remove duplicate string Issue-ID: VFC-1114 Change-Id: Ie3560b11067ef9dfbdb68325c9d934059198fb80 Signed-off-by: Sooriyaa --- .../vfc/nfvo/multivimproxy/common/util/restclient/HttpsRest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'service/src/main') diff --git a/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/HttpsRest.java b/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/HttpsRest.java index fa006c1..64f5968 100644 --- a/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/HttpsRest.java +++ b/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/HttpsRest.java @@ -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); } -- cgit 1.2.3-korg