Merge "sonar critical for Exception Handling"
[dmaap/messagerouter/mirroragent.git] / src / main / java / com / att / nsa / dmaapMMAgent / MirrorMakerAgent.java
index 37236f3..6c9cbd0 100644 (file)
@@ -174,7 +174,7 @@ public class MirrorMakerAgent {
                                try {
                                        input.close();
                                } catch (IOException e) {
-                                       e.printStackTrace();
+                                       logger.error("Exception occurred is " +e);
                                }
                        }
                        if (out != null) {
@@ -212,6 +212,7 @@ public class MirrorMakerAgent {
                                        try {
                                                Thread.sleep(1000);
                                        } catch (InterruptedException e) {
+                                                Thread.currentThread().interrupt();
                                        }
                                        mirrorMakers.getListMirrorMaker().set(i, mm);
                                } else {
@@ -362,7 +363,7 @@ public class MirrorMakerAgent {
 
                        }
                } catch (Exception e) {
-                       e.printStackTrace();
+                       logger.error("Exception is : " +e);
                }
 
        }