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>
@Override
public int send ( Collection<message> msgs ) throws IOException
{
- if ( msgs.size() > 0 )
+ if ( msgs.isEmpty() )
{
fSender.queue ( msgs );
}