aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-08 12:47:14 +0530
committerSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-08 13:02:19 +0530
commit39f80cabccf8a33c22c66a10c583cdbbb9d6e95f (patch)
tree0d3953569338c100ec59c79125a190129ffca69a
parenta551458a68ab090cbf4c7eb8ef196fc49b52204c (diff)
Sonar major issues
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>
-rw-r--r--src/main/java/com/att/nsa/mr/client/HostSelector.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/att/nsa/mr/client/HostSelector.java b/src/main/java/com/att/nsa/mr/client/HostSelector.java
index 0dba1e7..63ef404 100644
--- a/src/main/java/com/att/nsa/mr/client/HostSelector.java
+++ b/src/main/java/com/att/nsa/mr/client/HostSelector.java
@@ -127,7 +127,7 @@ public class HostSelector
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);