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);
                                        }
                                }
                        }