Added logger for exception block 62/75262/1
authorChandan Ghosh <cghosh12@in.ibm.com>
Fri, 4 Jan 2019 07:17:27 +0000 (12:47 +0530)
committerChandan Ghosh <cghosh12@in.ibm.com>
Fri, 4 Jan 2019 07:17:40 +0000 (12:47 +0530)
Added logger for exception block reported in sonar

Issue-ID: DMAAP-927
Change-Id: Ib1e120888bc1b7b4c51b39da37f49cd83ef770e8
Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/MirrorMakerAgent.java

index 86a653d..23fd99f 100644 (file)
@@ -111,7 +111,7 @@ public class MirrorMakerAgent {
                                try {
                                        input.close();
                                } catch (IOException e) {
-                                       e.printStackTrace();
+                                       logger.error("exception occured in checkStartup "+e);
                                }
                        }
                }
@@ -128,7 +128,7 @@ public class MirrorMakerAgent {
                                try {
                                        input.close();
                                } catch (IOException e) {
-                                       e.printStackTrace();
+                                       logger.error("exception occured in checkStartup "+e);
                                }
                        }
                }
@@ -176,7 +176,7 @@ public class MirrorMakerAgent {
                                prop.store(out, "");
 
                        } catch (Exception e) {
-                               e.printStackTrace();
+                               logger.error("exception occured in checkPropertiesFile "+e);
                        }
                } finally {
                        if (input != null) {
@@ -190,7 +190,7 @@ public class MirrorMakerAgent {
                                try {
                                        out.close();
                                } catch (IOException e) {
-                                       e.printStackTrace();
+                                       logger.error("exception occured in checkPropertiesFile "+e);
                                }
                        }
                }

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use