From eb61336d63865ab0e8319571660b81f7a76fec55 Mon Sep 17 00:00:00 2001 From: Soumendu Sekhar Acharya Date: Tue, 6 Feb 2018 18:49:14 +0530 Subject: sonar critical for Exception Handling 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 --- src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java index 37236f3..8f189b3 100644 --- a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java +++ b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java @@ -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(); -- cgit 1.2.3-korg