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-MbOi32hFUzlqc5Vg&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/HostSelector.java
Line No-130
Change-Id: Iab107c06d9463f42d34d98fff1073b4a358f7681
Issue-ID: DMAAP-567"
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
workingSet.remove(be.getHost());
}
- if (workingSet.size() == 0)
+ if (workingSet.isEmpty())
{
log.warn("All hosts were blacklisted; reverting to full set of hosts.");
workingSet.addAll(this.fBaseHosts);