diff options
author | Soumendu Sekhar Acharya <sa00498080@techmahindra.com> | 2017-12-05 13:23:36 +0530 |
---|---|---|
committer | Soumendu Sekhar Acharya <sa00498080@techmahindra.com> | 2017-12-05 13:23:36 +0530 |
commit | 78d09a8c2ed502b15725d83c69179ac97d62b24e (patch) | |
tree | 4d027d14927af4ad47bc95e5b3cb908a12bf137e /src/main/java | |
parent | e14182319556f222b6647d2cd96e03d24dc0e0d4 (diff) |
Critical For Use the original value instead
Condition added
Sonar Link:
https://sonar.onap.org/component_issues/index?id=org.onap.dmaap.messagerouter.dmaapclient%3AdmaapClient#resolved=false|assignees=soumendu|severities=CRITICAL
Location:
src/main/java/com/att/nsa/mr/client/HostSelector.java
Line No-69
Change-Id: Ic029c799efda27e975c409eac8a96b2c629da056
Issue-ID: DMAAP-176
Signed-off-by: Soumendu Sekhar Acharya <sa00498080@techmahindra.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/att/nsa/mr/client/HostSelector.java | 2 |
1 files changed, 2 insertions, 0 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 de0e52c..7e92bd8 100644 --- a/src/main/java/com/att/nsa/mr/client/HostSelector.java +++ b/src/main/java/com/att/nsa/mr/client/HostSelector.java @@ -66,6 +66,7 @@ public class HostSelector if (signature == null) { return; } + if(signature!=null && !baseHosts.isEmpty()) { int index = Math.abs(signature.hashCode()) % baseHosts.size(); Iterator it = this.fBaseHosts.iterator(); @@ -74,6 +75,7 @@ public class HostSelector it.next(); } this.fIdealHost = ((String)it.next()); + } } public String selectBaseHost() |