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-MbQb32hFUzlqc5Zn&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/impl/MRBatchPublisher.java
Line No-416
Change-Id: Ie1f85185d60e29004111003a55664e5217cd6ced
Issue-ID: DMAAP-362
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
private static boolean doSend ( LinkedList<TimestampedMessage> toSend, HttpClient client, String topic, boolean compress, Logger log )
{
// it's possible for this call to be made with an empty list. in this case, just return.
- if ( toSend.size() < 1 )
+ if ( toSend.isEmpty() )
{
return true;
}