From: varun gudisena Date: Wed, 7 Feb 2018 16:40:38 +0000 (+0000) Subject: Merge changes I38dad052,Ibc26d865 X-Git-Tag: v1.1.0~13 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fmessagerouter%2Fmirroragent.git;a=commitdiff_plain;h=6d61f783b7dbf9cf537703e39afad03a2ac10ddc;hp=-c Merge changes I38dad052,Ibc26d865 * changes: sonar critical for Exception Handling sonar critical for Exception Handling --- 6d61f783b7dbf9cf537703e39afad03a2ac10ddc diff --combined src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java index a187d89,cf395a8..0113f6d --- a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java +++ b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java @@@ -175,7 -175,7 +175,7 @@@ public class MirrorMakerAgent try { input.close(); } catch (IOException e) { - e.printStackTrace(); + logger.error("Exception occurred is " +e); } } if (out != null) { @@@ -213,7 -213,6 +213,7 @@@ try { Thread.sleep(1000); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } mirrorMakers.getListMirrorMaker().set(i, mm); } else { @@@ -364,7 -363,7 +364,7 @@@ } } catch (Exception e) { - e.printStackTrace(); + logger.error("Exception is : " +e); } } @@@ -447,13 -446,13 +447,13 @@@ Thread.currentThread().interrupt(); } } catch (IOException ex) { - ex.printStackTrace(); + logger.error(" IOException Occered " + ex); } finally { if (out != null) { try { out.close(); } catch (IOException e) { - e.printStackTrace(); + logger.error(" IOException Occered " + e); } } }