summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java1
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java1
-rw-r--r--ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java6
3 files changed, 4 insertions, 4 deletions
diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java
index 13146e4ec..c02ec5df3 100644
--- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java
+++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java
@@ -97,6 +97,7 @@ public class MessageRouterHttpClient implements SdncDmaapConsumer {
Thread.sleep(fetchPause);
} catch (InterruptedException e) {
Log.error("Could not sleep thread", e);
+ Thread.currentThread().interrupt();
}
}
}
diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java
index 3336b81f6..a6744045d 100644
--- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java
+++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java
@@ -111,6 +111,7 @@ public class MessageRouterHttpClientJdk implements SdncDmaapConsumer {
Thread.sleep(fetchPause);
} catch (InterruptedException e) {
Log.error("Could not sleep thread", e);
+ Thread.currentThread().interrupt();
}
}
}
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
index 8ea041e61..4ae5acd99 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
@@ -399,8 +399,7 @@ public class SdncUebCallback implements INotificationCallback {
// Save zip if TOSCA_CSAR
if (artifact.getArtifactType().contains("TOSCA_CSAR") || artifact.getArtifactName().contains(".csar")) {
- try {
- FileOutputStream outFile = new FileOutputStream(incomingDir.getAbsolutePath() + "/" + artifact.getArtifactName());
+ try(FileOutputStream outFile = new FileOutputStream(incomingDir.getAbsolutePath() + "/" + artifact.getArtifactName())) {
outFile.write(payloadBytes, 0, payloadBytes.length);
outFile.close();
writeSucceeded = true;
@@ -411,8 +410,7 @@ public class SdncUebCallback implements INotificationCallback {
} else {
String payload = new String(payloadBytes);
- try {
- FileWriter spoolFileWriter = new FileWriter(spoolFile);
+ try(FileWriter spoolFileWriter = new FileWriter(spoolFile)) {
spoolFileWriter.write(payload);
spoolFileWriter.close();
writeSucceeded = true;