From 92ffbb4a56b1f84ed130b04ca3a9954ce610a02a Mon Sep 17 00:00:00 2001 From: seshukm Date: Tue, 12 Sep 2017 10:26:45 +0530 Subject: Fix for SONAR critical issues Issue-Id : SO-117 Change-Id: I57e30d9a8a2b251a57466d92c49f41e2a5943b22 Signed-off-by: seshukm --- .../openecomp/mso/adapters/tenantrest/TenantRequestCommon.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'adapters/mso-adapters-rest-interface/src/main/java/org/openecomp') diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java index e5a9904d36..98be3c1478 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.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. @@ -29,7 +30,10 @@ import javax.xml.bind.Marshaller; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.SerializationConfig; +import org.openecomp.mso.logger.MsoLogger; + public class TenantRequestCommon { + private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); public String toJsonString() { try { String jsonString = null; @@ -38,8 +42,7 @@ public class TenantRequestCommon { jsonString = mapper.writeValueAsString(this); return jsonString; } catch (Exception e) { - // Shouldn't happen... - e.printStackTrace(); + LOGGER.debug("Exception :",e); return ""; } } @@ -53,8 +56,7 @@ public class TenantRequestCommon { marshaller.marshal(this, bs); return bs.toString(); } catch (Exception e) { - // Shouldn't happen... - e.printStackTrace(); + LOGGER.debug("Exception :",e); return ""; } } -- cgit 1.2.3-korg