Merge changes from topics 'cghosh-4jan-sonarfix', 'cghosh-4jan-sonar-fix'
authorRam Koya <rk541m@att.com>
Wed, 16 Jan 2019 22:31:05 +0000 (22:31 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 16 Jan 2019 22:31:05 +0000 (22:31 +0000)
* changes:
  Added logger for exception block
  Added logger for exception log

src/main/java/org/onap/dmaap/mr/dmaapMMAgent/MirrorMakerAgent.java
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/utils/MirrorMakerProcessHandler.java

index de19474..304a067 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);
                                }
                        }
                }
index 37e0981..9fe80db 100644 (file)
@@ -97,7 +97,7 @@ public class MirrorMakerProcessHandler {
                        //      }
                        }
                } catch (Exception e) {
-                       e.printStackTrace();
+                       logger.error("Error occured in MirrorMakerProcessHandler.checkMirrorMakerProcess"+e);
                }
                return false;
        }

© 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