aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorrama-huawei <rama.subba.reddy.s@huawei.com>2017-09-14 15:22:43 +0530
committerRama SubbaReddy <rama.subba.reddy.s@huawei.com>2017-09-14 11:37:51 +0000
commitaf7732a8c2f1b96046a6a2e9b73e606aabb07af7 (patch)
tree1ab1b6742d5a6f6516e3e2165eb71a635863d95d /src/main/java/com
parent646ebf1d617a028ba64423400e1e322115a8a782 (diff)
Fix for Sonar critical issues
DCAEGEN2-93 Change-Id: I3b55d9cd54deee9ef380b2a4324dc4eae1e08ef6 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java4
-rw-r--r--src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java b/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java
index a65683b..85b6126 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java
+++ b/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java
@@ -29,7 +29,7 @@ import com.att.aft.dme2.api.util.DME2ExchangeRequestHandler;
import com.att.nsa.mr.client.MRClientFactory;
public class PreferredRouteRequestHandler implements DME2ExchangeRequestHandler {
- private Logger fLog = LoggerFactory.getLogger(this.getClass().getName());
+ private Logger logger = LoggerFactory.getLogger(this.getClass().getName());
@Override
public void handleRequest(DME2ExchangeRequestContext requestData) {
@@ -47,7 +47,7 @@ public class PreferredRouteRequestHandler implements DME2ExchangeRequestHandler
MRClientFactory.prop.load(MRClientFactory.routeReader);
} catch (Exception ex) {
- fLog.error("Request Router Error " + ex.toString());
+ logger.error("Request Router Error " + ex.toString());
}
return MRClientFactory.prop.getProperty(routeKey);
}
diff --git a/src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java b/src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java
index 4df9fcb..bc54a01 100644
--- a/src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java
+++ b/src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java
@@ -24,6 +24,9 @@ package com.att.nsa.mr.dme.client;
import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import javax.ws.rs.core.MultivaluedMap;
import com.att.nsa.mr.client.MRClientFactory;
@@ -31,6 +34,8 @@ import com.att.nsa.mr.client.MRConsumer;
public class SimpleExampleConsumer {
+ private static final Logger logger = LoggerFactory.getLogger(SimpleExampleConsumer.class);
+
public static void main(String[] args) {
long count = 0;
@@ -72,6 +77,7 @@ public class SimpleExampleConsumer {
}
} catch (Exception x) {
System.err.println(x.getClass().getName() + ": " + x.getMessage());
+ logger.error("exception: ", x);
}
}
}