sonar critical for Exception handling 69/30969/1
authorSoumendu Sekhar Acharya <sa00498080@techmahindra.com>
Fri, 9 Feb 2018 04:03:39 +0000 (09:33 +0530)
committerSoumendu Sekhar Acharya <sa00498080@techmahindra.com>
Fri, 9 Feb 2018 04:03:39 +0000 (09:33 +0530)
Use a logger to log this exception
Sonar Link:
https://sonar.onap.org/component_issues/index?id=org.onap.dmaap.messagerouter.mirroragent%3AdmaapMMAgent#severities=CRITICAL|assignees=soumendu
Location:
src/main/java/com/att/nsa/dmaapMMAgent/utils/MirrorMakerProcessHandler.java
Line No- 143

Change-Id: I1612b460cd6ead609ffadd7b621f26159a68e7d4
Issue-ID: DMAAP-284
Signed-off-by: Soumendu Sekhar Acharya <sa00498080@techmahindra.com>
src/main/java/com/att/nsa/dmaapMMAgent/utils/MirrorMakerProcessHandler.java

index 80a47af..dd1442e 100644 (file)
@@ -141,7 +141,7 @@ public class MirrorMakerProcessHandler {
                                                                // System.out.println(line);
                                                        }
                                                } catch (Exception anExc) {
-                                                       anExc.printStackTrace();
+                                                       logger.error("Exception at startMirrorMaker method else part run method:" + anExc.getMessage());
                                                }
                                        }
                                }.start();

© 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