diff options
author | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2018-03-28 16:35:10 +0530 |
---|---|---|
committer | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2018-03-28 16:35:10 +0530 |
commit | e8ba31faaaa50e45a232b27fa8832b8004f1bee3 (patch) | |
tree | abbf624fce6158f44f1a9acf5bb726badf6109bf /src/main | |
parent | 4314eea96946e72d296fca500b4a17168af58caf (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-MbQb32hFUzlqc5Zn&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java
Line No-416
Change-Id: Ie1f85185d60e29004111003a55664e5217cd6ced
Issue-ID: DMAAP-362
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java b/src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java index cf42907..02c3c69 100644 --- a/src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java +++ b/src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java @@ -413,7 +413,7 @@ public class MRBatchPublisher implements MRBatchingPublisher private static boolean doSend ( LinkedList<TimestampedMessage> toSend, HttpClient client, String topic, boolean compress, Logger log ) { // it's possible for this call to be made with an empty list. in this case, just return. - if ( toSend.size() < 1 ) + if ( toSend.isEmpty() ) { return true; } |