Sonar major issues 33/59833/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Thu, 9 Aug 2018 10:17:10 +0000 (15:47 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Thu, 9 Aug 2018 10:17:10 +0000 (15:47 +0530)
 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-MbQb32hFUzlqc5Zk&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java
Line No-137

Change-Id: Ia3464cd19af992d4d48885e5a2dc4a75b726f9e7
Issue-ID: DMAAP-574
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java

index 6008251..7d1e396 100644 (file)
@@ -134,7 +134,7 @@ public class MRBatchPublisher implements MRBatchingPublisher
        @Override
        public int send ( Collection<message> msgs ) throws IOException
        {
-               if ( msgs.size() > 0 )
+               if ( msgs.isEmpty() )
                {
                        fSender.queue ( msgs );
                }