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 --- .../org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java | 5 +++-- .../org/openecomp/mso/adapters/workflowmessage/WMAdapterRest.java | 2 ++ .../org/openecomp/mso/adapters/workflowmessage/WMAdapterUtils.java | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'adapters/mso-workflow-message-adapter') diff --git a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java index 1d07d7d233..253523eaac 100644 --- a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java +++ b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.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. @@ -160,7 +161,7 @@ public class BPRestCallback { try { EntityUtils.consume(httpResponse.getEntity()); } catch (Exception e) { - // Ignore + LOGGER.debug("Exception :",e); } } @@ -168,7 +169,7 @@ public class BPRestCallback { try { method.reset(); } catch (Exception e) { - // Ignore + LOGGER.debug("Exception :",e); } } diff --git a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterRest.java b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterRest.java index 3b6c16085a..dc94a78733 100644 --- a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterRest.java +++ b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterRest.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. @@ -99,6 +100,7 @@ public class WMAdapterRest { contentType = ContentType.parse(contentTypeHeader); } catch (Exception e) { // If we don't get a valid one, we handle it below. + LOGGER.debug("Exception :",e); } } diff --git a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterUtils.java b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterUtils.java index 761263f423..f152931ae5 100644 --- a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterUtils.java +++ b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterUtils.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. @@ -36,7 +37,7 @@ public final class WMAdapterUtils { try { return UriUtils.encodePathSegment(pathSegment, "UTF-8"); } catch (UnsupportedEncodingException e) { - throw new RuntimeException("UTF-8 encoding is not supported"); + throw new RuntimeException("UTF-8 encoding is not supported",e); } } -- cgit 1.2.3-korg