From 171ec7b74a11658277f9e9fe1dcc893a8225db9e Mon Sep 17 00:00:00 2001 From: seshukm Date: Tue, 12 Sep 2017 16:13:47 +0530 Subject: Fix for SONAR critical issues Issue-Id : SO-117 Change-Id: Icdc64605b475e20af7e871135af327f7d0e38792 Signed-off-by: seshukm --- bpmn/MSORESTClient/pom.xml | 5 +++++ .../src/main/java/org/openecomp/mso/rest/RESTClient.java | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'bpmn/MSORESTClient') 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 @@ test + + org.openecomp.so + common + ${project.version} + MSORESTClient 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. *

@@ -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(); -- cgit 1.2.3-korg