diff options
author | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2018-08-13 11:22:11 +0530 |
---|---|---|
committer | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2018-08-13 11:22:11 +0530 |
commit | bf9c3366bee0400d6ee4c9d7de3fb2613afc445e (patch) | |
tree | e7b43f2410bed90e3b14506d125f55e6dabd4474 /src/main | |
parent | 9604f9e97d2fde33ebca210e5ae7fabc32abf92f (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-MbRu32hFUzlqc5eg&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
Line No-180
Change-Id: I7f191d42a87ba5e70005ad282d3d8bbda71998f4
Issue-ID: DMAAP-584
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/MRSimplerBatchPublisher.java | 2 |
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 5bb5087..991c0e4 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 @@ -177,7 +177,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP public void close() { try { final List<message> remains = close(Long.MAX_VALUE, TimeUnit.MILLISECONDS); - if (remains.size() > 0) { + if (remains.isEmpty()) { getLog().warn("Closing publisher with " + remains.size() + " messages unsent. " + "Consider using MRBatchingPublisher.close( long timeout, TimeUnit timeoutUnits ) to recapture unsent messages on close."); } |