summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-02-28 09:23:20 +0100
committerr.bogacki <r.bogacki@samsung.com>2019-02-28 09:24:08 +0100
commit72dcb2d064f57629169dac522872949539d276dd (patch)
tree43f6bfe0d22830ff489877befc1d6b2b793fd0a2
parentade5e9910524146f2257183909842263136698cc (diff)
Removed MsoLogger from 'MSOCoreBPMN' II
Removed MsoLogger from adapters ('MSOCoreBPMN') Replaced MsoLogger with plain slf4j. Refactored login output. Fixed imports. Change-Id: Ie527c56f3dd97f26c7d7b7ea947a853fc63a1157 Issue-ID: LOG-631 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java15
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java16
2 files changed, 17 insertions, 14 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
index 49bf95fab0..6c8070f9bd 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -21,7 +23,6 @@
package org.onap.so.bpmn.core.xml;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -50,9 +51,9 @@ import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.commons.lang3.StringEscapeUtils;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
@@ -64,7 +65,7 @@ import org.xml.sax.SAXException;
public final class XmlTool {
private static final Map<String, Integer> ENTITIES = new HashMap<>();
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.BPEL, XmlTool.class);
+ private static final Logger logger = LoggerFactory.getLogger(XmlTool.class);
static {
ENTITIES.put("amp", 38);
ENTITIES.put("quot", 34);
@@ -165,7 +166,7 @@ public final class XmlTool {
*/
public static String removeNamespaces(Object xml) {
if (xml == null) {
- LOGGER.debug("removeNamespaces input object is null , returning null");
+ logger.debug("removeNamespaces input object is null , returning null");
return null;
}
@@ -204,7 +205,7 @@ public final class XmlTool {
}
return out.toString();
} catch (Exception e) {
- LOGGER.debug("Exception at readResourceFile stream: " + e);
+ logger.debug("Exception at readResourceFile stream: " + e);
return null;
}
}
@@ -242,7 +243,7 @@ public final class XmlTool {
//System.out.println("Did not find element tag " + elementTag + " in XML");
return Optional.empty();
} else {
- modNode.setTextContent(newValue);
+ modNode.setTextContent(newValue);
}
TransformerFactory transformerFactory = TransformerFactory.newInstance();
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java
index f3cc094873..15f6fbe008 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -21,18 +23,18 @@
package org.onap.so.bpmn.core.utils;
import java.sql.Connection;
-import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Sets up the unit test (H2) database for Camunda.
*/
public class CamundaDBSetup {
private static boolean isDBConfigured = false;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CamundaDBSetup.class);
+ private static final Logger logger = LoggerFactory.getLogger(CamundaDBSetup.class);
private CamundaDBSetup() {
}
@@ -42,7 +44,7 @@ public class CamundaDBSetup {
return;
}
- LOGGER.debug ("Configuring the Camunda H2 database for MSO");
+ logger.debug ("Configuring the Camunda H2 database for MSO");
Connection connection = null;
PreparedStatement stmt = null;
@@ -57,7 +59,7 @@ public class CamundaDBSetup {
try {
stmt.close();
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :",e);
}
}
@@ -65,9 +67,9 @@ public class CamundaDBSetup {
try {
connection.close();
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :",e);
}
}
}
}
-} \ No newline at end of file
+}