summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-14 10:46:31 +0530
committerSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-14 10:46:31 +0530
commit2374c15b30a1ebb4bd1d6960972a55d749167c95 (patch)
tree4edc9df4cb3c393d76273b3453ad9be7c635d00c /src/main/java
parentf2f14cc90640a81b75f607fb09a9cfe2633abe6f (diff)
Sonar major issues
Use isEmpty() to check whether the collection is empty or not Sonar Link: https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.dmaapclient%3AdmaapClient&open=AV4-MbRu32hFUzlqc5ei&resolved=false&severities=MAJOR Location: src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java Line No-238 Change-Id: I7896ced67ab12816b92fe972322dad4ff4558cf8 Issue-ID: DMAAP-589 Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java b/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
index 741705f..ef0d13a 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
+++ b/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
@@ -235,7 +235,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
private synchronized boolean shouldSendNow() {
boolean shouldSend = false;
- if (fPending.size() > 0) {
+ if (fPending.isEmpty()) {
final long nowMs = Clock.now();
shouldSend = (fPending.size() >= fMaxBatchSize);