From c8961a6aa9a7315b3fb19edd9ce986e87d910a44 Mon Sep 17 00:00:00 2001 From: Seshu-Kumar-M Date: Tue, 5 Sep 2017 19:02:54 +0800 Subject: Sonar critical issues fix Issue-Id : SO-98 Change-Id: I229819e850c36fce9f8715d1534f8e5c5d812a0a Signed-off-by: Seshu-Kumar-M --- .../mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java | 4 ++-- .../src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'bpmn/MSOCoreBPMN/src/main/java') diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java index 2453700bce..26885132df 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * OPENECOMP - MSO + * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ @@ -412,7 +412,7 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin { } } } catch(Exception e) { - // Do nothing + LOGGER.debug("Exception at notify: " + e); } } } diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java index 42114758b0..ac0c795d7a 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * OPENECOMP - MSO + * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ @@ -46,6 +46,7 @@ import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; +import org.openecomp.mso.logger.MsoLogger; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -58,7 +59,7 @@ import org.xml.sax.SAXException; public final class XmlTool { private static final Map ENTITIES = new HashMap(); - + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.BPEL); static { ENTITIES.put("amp", new Integer(38)); ENTITIES.put("quot", new Integer(34)); @@ -276,6 +277,7 @@ public final class XmlTool { */ public static String removeNamespaces(Object xml) { if (xml == null) { + LOGGER.debug("removeNamespaces input object is null , returning null"); return null; } @@ -326,7 +328,7 @@ public final class XmlTool { try { stream.close(); } catch (Exception e) { - // Ignore + LOGGER.debug("Exception at readResourceFile close stream: " + e); } } } -- cgit 1.2.3-korg