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-MbQb32hFUzlqc5Zm&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java
Line No-322
Change-Id: Ifa4a91a303f49be0c264a9af2498bf70b8056168
Issue-ID: DMAAP-361
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
fReadLock.lock ();
try
{
- if ( fNextBatch.size () > 0 )
+ if ( fNextBatch.isEmpty() )
{
final long nowMs = System.currentTimeMillis ();
shouldSend = ( force || fNextBatch.size() >= fMaxBatchSize );