summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorsunil.unnava <sunil.unnava@att.com>2019-04-16 14:13:39 -0400
committersunil.unnava <sunil.unnava@att.com>2019-04-16 14:14:02 -0400
commitab3015141a2cb42308f1d09dc3a7edc8c10cf5c7 (patch)
treea83044d8e511775b18759f8b7dae689182e8fc94 /src/main/java/org
parent7823ae72abf905f77842d533374b7f2ebb7c0b34 (diff)
revert sonar fix
Issue-ID: DMAAP-1169 Change-Id: Id81fc8e8acc485184fbe09b6b33aa050ba1daf21 Signed-off-by: sunil.unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java4
-rw-r--r--src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/KafkaConsumerCache.java4
-rw-r--r--src/main/java/org/onap/dmaap/dmf/mr/beans/DMaaPCambriaLimiter.java2
-rw-r--r--src/main/java/org/onap/dmaap/dmf/mr/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java2
-rw-r--r--src/main/java/org/onap/dmaap/dmf/mr/resources/CambriaOutboundEventStream.java2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java b/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java
index 4e54a3c..67a8af9 100644
--- a/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java
+++ b/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/Kafka011Consumer.java
@@ -113,13 +113,13 @@ public class Kafka011Consumer implements Consumer {
public synchronized Consumer.Message nextMessage() {
try {
- if (fPendingMsgs.isEmpty()) {
+ if (!fPendingMsgs.isEmpty()) {
return makeMessage(fPendingMsgs.take());
}
} catch (InterruptedException x) {
log.warn("After size>0, pending msg take() threw InterruptedException. Ignoring. (" + x.getMessage() + ")",
x);
- //Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
Callable<Boolean> run = new Callable<Boolean>() {
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/KafkaConsumerCache.java b/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/KafkaConsumerCache.java
index 00b6a75..647f4ce 100644
--- a/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/KafkaConsumerCache.java
+++ b/src/main/java/org/onap/dmaap/dmf/mr/backends/kafka/KafkaConsumerCache.java
@@ -299,7 +299,7 @@ public class KafkaConsumerCache {
curator.blockUntilConnected();
} catch (InterruptedException e) {
log.error("error while setting curator framework :",e);
- //Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
}
@@ -512,7 +512,7 @@ public class KafkaConsumerCache {
Thread.sleep(consumerHandoverWaitMs);
} catch (InterruptedException e) {
log.error("InterruptedException in dropTimedOutConsumer",e);
- //Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
log.info("Dropped " + key + " consumer due to timeout");
}
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/beans/DMaaPCambriaLimiter.java b/src/main/java/org/onap/dmaap/dmf/mr/beans/DMaaPCambriaLimiter.java
index 01c46e7..f645c8d 100644
--- a/src/main/java/org/onap/dmaap/dmf/mr/beans/DMaaPCambriaLimiter.java
+++ b/src/main/java/org/onap/dmaap/dmf/mr/beans/DMaaPCambriaLimiter.java
@@ -154,7 +154,7 @@ public class DMaaPCambriaLimiter {
}
} catch (InterruptedException e) {
log.error("Exception "+ e);
- //Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java b/src/main/java/org/onap/dmaap/dmf/mr/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java
index 9c1fcb2..f59f704 100644
--- a/src/main/java/org/onap/dmaap/dmf/mr/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java
+++ b/src/main/java/org/onap/dmaap/dmf/mr/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java
@@ -198,7 +198,7 @@ public class DMaaPCambriaSimplerBatchPublisher extends CambriaBaseClient
}
} catch (InterruptedException e) {
getLog().warn("Possible message loss. " + e.getMessage(), e);
- //Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
} catch (IOException e) {
getLog().warn("Possible message loss. " + e.getMessage(), e);
}
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/resources/CambriaOutboundEventStream.java b/src/main/java/org/onap/dmaap/dmf/mr/resources/CambriaOutboundEventStream.java
index 27ffc89..537fc22 100644
--- a/src/main/java/org/onap/dmaap/dmf/mr/resources/CambriaOutboundEventStream.java
+++ b/src/main/java/org/onap/dmaap/dmf/mr/resources/CambriaOutboundEventStream.java
@@ -333,7 +333,7 @@ public class CambriaOutboundEventStream implements StreamWriter {
// FIXME: would be good to wait/signal
Thread.sleep(100);
} catch (InterruptedException e) {
- // Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
}
});