Merge "sonar critical for error-handling"
authorvarun gudisena <vg411h@att.com>
Wed, 7 Feb 2018 16:40:04 +0000 (16:40 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 7 Feb 2018 16:40:04 +0000 (16:40 +0000)
1  2 
src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java

@@@ -102,7 -102,7 +102,7 @@@ public class MirrorMakerAgent 
                                try {
                                        input.close();
                                } catch (IOException e) {
 -                                      logger.error("IOException" + e);
 +                                      logger.error(" IOException occers " + e);
                                }
                        }
                }
                        }
                        input = new FileInputStream(mmagenthome + "/etc/" + agentName + propName + ".properties");
                } catch (IOException ex) {
 +                      logger.error(" IOException will be handled " + ex);
                        try {
                                input = new FileInputStream(mmagenthome + "/etc/" + propName + ".properties");
                                Properties prop = new Properties();
                                try {
                                        input.close();
                                } catch (IOException e) {
-                                       e.printStackTrace();
+                                       logger.error("Exception occurred is " +e);
                                }
                        }
                        if (out != null) {
  
                        }
                } catch (Exception e) {
-                       e.printStackTrace();
+                       logger.error("Exception is : " +e);
                }
  
        }
                                                out.close();
                                        } catch (IOException e) {
                                                e.printStackTrace();
 +                                              logger.error("IOException occered " + 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