aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/att/nsa
diff options
context:
space:
mode:
authorSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-16 12:28:52 +0530
committerSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-16 12:28:52 +0530
commit355b66b9d95ff73902fbc43207fa08013776b9c2 (patch)
tree0e8ef8a18b56ecbf2da5193135a8ebfede3dfd73 /src/main/java/com/att/nsa
parent3fc90dba2ed98931ec3336e06cc055c645668454 (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-MbRu32hFUzlqc5ej&resolved=false&severities=MAJOR Location: src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java Line No-421 Change-Id: Ie8852caff9e0130aa9b69c4a410bf3949c66713f Issue-ID: DMAAP-604 Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main/java/com/att/nsa')
-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..409ee70 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
@@ -418,7 +418,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
public synchronized MRPublisherResponse sendBatchWithResponse() {
// it's possible for this call to be made with an empty list. in this
// case, just return.
- if (fPending.size() < 1) {
+ if (fPending.isEmpty()) {
pubResponse.setResponseCode(String.valueOf(HttpStatus.SC_BAD_REQUEST));
pubResponse.setResponseMessage("No Messages to send");
return pubResponse;