aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-node/src/main/java/org/onap
diff options
context:
space:
mode:
authorAmaresh Kumar <kamaresh@in.ibm.com>2018-08-21 11:28:13 +0530
committerAmaresh Kumar <kamaresh@in.ibm.com>2018-08-21 11:28:27 +0530
commit7abb2a2bb8b6fb0ebba5187a79184e07a23941e6 (patch)
treea60d53c1d2e586bb7694e93c81b60d45ee96aebf /datarouter-node/src/main/java/org/onap
parent40b51baa84d71843ceb07101e491a0dfccaa145f (diff)
fixed Sonar issues
fixed sonar issues in nodemain.java files. Issue-ID: DMAAP-618 Change-Id: I45fb6a83b4c53eb858eae61f4647f8bd9df8b3a1 Signed-off-by: Amaresh Kumar <kamaresh@in.ibm.com>
Diffstat (limited to 'datarouter-node/src/main/java/org/onap')
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
index 07e10b2b..8aaa577c 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
@@ -39,7 +39,7 @@ public class NodeMain {
private NodeMain() {
}
- private static Logger logger = Logger.getLogger("org.onap.dmaap.datarouter.node.NodeMain");
+ private static Logger LOGGER = Logger.getLogger("org.onap.dmaap.datarouter.node.NodeMain");
private static class WaitForConfig implements Runnable {
@@ -56,15 +56,15 @@ public class NodeMain {
synchronized void waitForConfig() {
localNodeConfigManager.registerConfigTask(this);
while (!localNodeConfigManager.isConfigured()) {
- logger.info("NODE0003 Waiting for Node Configuration");
+ LOGGER.info("NODE0003 Waiting for Node Configuration");
try {
wait();
} catch (Exception e) {
- logger.debug("NodeMain: waitForConfig exception");
+ LOGGER.debug("NodeMain: waitForConfig exception. Exception Message:- " +e.getMessage());
}
}
localNodeConfigManager.deregisterConfigTask(this);
- logger.info("NODE0004 Node Configuration Data Received");
+ LOGGER.info("NODE0004 Node Configuration Data Received");
}
}
@@ -85,15 +85,13 @@ public class NodeMain {
* property. By default, it is "etc/node.properties".
*/
public static void main(String[] args) throws Exception {
- logger.info("NODE0001 Data Router Node Starting");
+ LOGGER.info("NODE0001 Data Router Node Starting");
IsFrom.setDNSCache();
nodeConfigManager = NodeConfigManager.getInstance();
- logger.info("NODE0002 I am " + nodeConfigManager.getMyName());
+ LOGGER.info("NODE0002 I am " + nodeConfigManager.getMyName());
(new WaitForConfig(nodeConfigManager)).waitForConfig();
delivery = new Delivery(nodeConfigManager);
- LogManager lm = new LogManager(nodeConfigManager);
Server server = new Server();
-
// HTTP configuration
HttpConfiguration httpConfiguration = new HttpConfiguration();
httpConfiguration.setIdleTimeout(2000);
@@ -113,7 +111,7 @@ public class NodeMain {
sslContextFactory.setKeyManagerPassword(nodeConfigManager.getKPass());
/* Skip SSLv3 Fixes */
sslContextFactory.addExcludeProtocols("SSLv3");
- logger.info("Excluded protocols node-" + Arrays.toString(sslContextFactory.getExcludeProtocols()));
+ LOGGER.info("Excluded protocols node-" + Arrays.toString(sslContextFactory.getExcludeProtocols()));
/* End of SSLv3 Fixes */
HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
@@ -138,7 +136,7 @@ public class NodeMain {
ctxt.setContextPath("/");
server.setHandler(ctxt);
ctxt.addServlet(new ServletHolder(new NodeServlet()), "/*");
- logger.info("NODE0005 Data Router Node Activating Service");
+ LOGGER.info("NODE0005 Data Router Node Activating Service");
server.start();
server.join();
}