summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorDushyant Singh Thakur <dt00503496@techmahindra.com>2018-02-05 18:43:29 +0530
committerDushyant Singh Thakur <dt00503496@techmahindra.com>2018-02-05 18:43:29 +0530
commit737e0f13a19b68e9d6d6d48b6df5395127c45f67 (patch)
tree83a7eb58761f0534b168d2022b2304e4bdcda2d2 /src/main/java/com
parentc4999261363c42758b50b31d33f910c5344fb339 (diff)
sonar design for error-handling
Used a logger to log the exception Sonar Link: https://sonar.onap.org/component_issues?id=org.onap.dmaap.messagerouter.mirroragent%3AdmaapMMAgent#assignees=dthakur Location: src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java Line No-169 Change-Id: I751b0052bffc4dcb641b62db4f4676a664185ce8 Issue-ID: DMAAP-225 Signed-off-by: Dushyant Singh Thakur <dt00503496@techmahindra.com>
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java
index 3efbf4f..bd2a2a5 100644
--- a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java
+++ b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java
@@ -166,7 +166,7 @@ public class MirrorMakerAgent {
prop.store(out, "");
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("Exception at checkPropertiesFile " +e);
}
} finally {
if (input != null) {
@@ -380,7 +380,7 @@ public class MirrorMakerAgent {
}
}
logger.info("Adding new MirrorMaker:" + newMirrorMaker.name);
- if (!exists && mirrorMakers != null) {
+ if (exists == false && mirrorMakers != null) {
mirrorMakers.getListMirrorMaker().add(newMirrorMaker);
} else if (exists == false && mirrorMakers == null) {
mirrorMakers = new ListMirrorMaker();