sonar critical for Exception Handling 55/30455/2
authorSoumendu Sekhar Acharya <sa00498080@techmahindra.com>
Tue, 6 Feb 2018 13:19:14 +0000 (18:49 +0530)
committerSoumendu Sekhar Acharya <SA00498080@techmahindra.com>
Wed, 7 Feb 2018 05:38:26 +0000 (05:38 +0000)
Re-interrupt this method
Sonar Link:
https://sonar.onap.org/component_issues/index?id=org.onap.dmaap.messagerouter.mirroragent%3AdmaapMMAgent#resolved=false|severities=CRITICAL|assignees=Soumendu
Location:
src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java
Line No-442

Change-Id: Idf926749f274d00ecd77f7da445f38733a51d61b
Issue-ID: DMAAP-240
Signed-off-by: Soumendu Sekhar Acharya <sa00498080@techmahindra.com>
src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java

index 37236f3..8f189b3 100644 (file)
@@ -36,6 +36,7 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Properties;
 
+import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.jasypt.util.text.BasicTextEncryptor;
 
@@ -441,6 +442,8 @@ public class MirrorMakerAgent {
                                try {
                                        Thread.sleep(1000);
                                } catch (InterruptedException e) {
+                                       logger.log(Level.WARN, "Interrupted!", e);
+                                       Thread.currentThread().interrupt();
                                }
                        } catch (IOException ex) {
                                ex.printStackTrace();

© 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