From: varun gudisena Date: Wed, 7 Feb 2018 16:40:04 +0000 (+0000) Subject: Merge "sonar critical for error-handling" X-Git-Tag: v1.1.0~16 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fmessagerouter%2Fmirroragent.git;a=commitdiff_plain;h=0885495037027c74e440ecc486f6bc45b90ff039;hp=-c Merge "sonar critical for error-handling" --- 0885495037027c74e440ecc486f6bc45b90ff039 diff --combined src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java index 37236f3,2fc712b..1f7ddc6 --- a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java +++ b/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); } } } @@@ -152,7 -152,6 +152,7 @@@ } 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(); @@@ -174,7 -173,7 +174,7 @@@ try { input.close(); } catch (IOException e) { - e.printStackTrace(); + logger.error("Exception occurred is " +e); } } if (out != null) { @@@ -362,7 -361,7 +362,7 @@@ } } catch (Exception e) { - e.printStackTrace(); + logger.error("Exception is : " +e); } } @@@ -493,7 -492,6 +493,7 @@@ out.close(); } catch (IOException e) { e.printStackTrace(); + logger.error("IOException occered " + e); } } }