summaryrefslogtreecommitdiffstats
path: root/datarouter-node/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-node/src/main/java')
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java1
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java21
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java8
3 files changed, 11 insertions, 19 deletions
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
index 4af4bd0b..7ecbaafd 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
@@ -257,7 +257,6 @@ public class NodeConfigManager implements DeliveryQueueHelper {
}
}
} catch (Exception e) {
- e.printStackTrace();
NodeUtils.setIpAndFqdnForEelf("fetchconfigs");
eelflogger.error(EelfMsgs.MESSAGE_CONF_FAILED, e.toString());
logger.error("NODE0306 Configuration failed " + e.toString() + " - try again later", e);
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
index e5eb2edc..b54068b5 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
@@ -68,18 +68,15 @@ public class NodeServlet extends HttpServlet {
.getLogger("org.onap.dmaap.datarouter.node.NodeServlet");
static {
- try {
- final String ws = "\\s*";
- // assume that \\ and \" have been replaced by X
- final String string = "\"[^\"]*\"";
- //String string = "\"(?:[^\"\\\\]|\\\\.)*\"";
- final String number = "[+-]?(?:\\.\\d+|(?:0|[1-9]\\d*)(?:\\.\\d*)?)(?:[eE][+-]?\\d+)?";
- final String value = "(?:" + string + "|" + number + "|null|true|false)";
- final String item = string + ws + ":" + ws + value + ws;
- final String object = ws + "\\{" + ws + "(?:" + item + "(?:" + "," + ws + item + ")*)?\\}" + ws;
- MetaDataPattern = Pattern.compile(object, Pattern.DOTALL);
- } catch (Exception e) {
- }
+ final String ws = "\\s*";
+ // assume that \\ and \" have been replaced by X
+ final String string = "\"[^\"]*\"";
+ //String string = "\"(?:[^\"\\\\]|\\\\.)*\"";
+ final String number = "[+-]?(?:\\.\\d+|(?:0|[1-9]\\d*)(?:\\.\\d*)?)(?:[eE][+-]?\\d+)?";
+ final String value = "(?:" + string + "|" + number + "|null|true|false)";
+ final String item = string + ws + ":" + ws + value + ws;
+ final String object = ws + "\\{" + ws + "(?:" + item + "(?:" + "," + ws + item + ")*)?\\}" + ws;
+ MetaDataPattern = Pattern.compile(object, Pattern.DOTALL);
}
/**
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
index 01585d9f..cc21992c 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
@@ -55,12 +55,6 @@ public class NodeUtils {
private static EELFLogger eelfLogger = EELFManager.getInstance()
.getLogger("org.onap.dmaap.datarouter.node.NodeUtils");
private static Logger nodeUtilsLogger = Logger.getLogger("org.onap.dmaap.datarouter.node.NodeUtils");
- private static SimpleDateFormat logDate;
-
- static {
- logDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- logDate.setTimeZone(TimeZone.getTimeZone("GMT"));
- }
private NodeUtils() {
}
@@ -243,6 +237,8 @@ public class NodeUtils {
* Format a logging timestamp as yyyy-mm-ddThh:mm:ss.mmmZ
*/
public static synchronized String logts(Date when) {
+ SimpleDateFormat logDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ logDate.setTimeZone(TimeZone.getTimeZone("GMT"));
return (logDate.format(when));
}