aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSurendra Reddy Katam <SK00524980@techmahindra.com>2018-03-29 10:37:53 +0530
committerSurendra Reddy Katam <SK00524980@techmahindra.com>2018-03-29 10:37:53 +0530
commita459bd158fe210efc8558be79165821ab6fcbee8 (patch)
tree56497362483ffe5351f464df2f602c6009f9b5c5
parentbaee205a51f08a5209a10df7bf134022cbb12552 (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-MbQb32hFUzlqc5Zl&resolved=false&severities=MAJOR Location: src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java Line No-161 Change-Id: I19a085d5a602005807c56d75e2b5327050b311b2 Issue-ID: DMAAP-161 Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
-rw-r--r--src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java2
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 02c3c69..1310986 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
@@ -158,7 +158,7 @@ public class MRBatchPublisher implements MRBatchingPublisher
try
{
final List<message> remains = close ( Long.MAX_VALUE, TimeUnit.MILLISECONDS );
- if ( remains.size() > 0 )
+ if ( remains.isEmpty() )
{
fLog.warn ( "Closing publisher with " + remains.size() + " messages unsent. "
+ "(Consider using the alternate close method to capture unsent messages in this case.)" );