diff options
author | varun gudisena <vg411h@att.com> | 2017-09-23 00:00:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-23 00:00:52 +0000 |
commit | 4f8ff86d68b0b0a2cac3f072fa5d02989d276d3e (patch) | |
tree | 7378ed590032a1c5e9dc89c90b95de6692d34973 /src/main/java/com | |
parent | 78ed9e0f89d412abad4b4d1f68dc37afa808d348 (diff) | |
parent | af7732a8c2f1b96046a6a2e9b73e606aabb07af7 (diff) |
Merge "Fix for Sonar critical issues"
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/att/nsa/mr/dme/client/PreferredRouteRequestHandler.java | 4 | ||||
-rw-r--r-- | src/main/java/com/att/nsa/mr/dme/client/SimpleExampleConsumer.java | 6 |
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); } } } |