diff options
author | varun gudisena <vg411h@att.com> | 2017-12-06 16:01:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-12-06 16:01:10 +0000 |
commit | b21a9dfab099a90c2ad4187938ee03f7f97ff26e (patch) | |
tree | 6c396af85522cfbfd7a2fcc7f9b4aab5218dcb9b /src/main/java | |
parent | 792f22fe3bcb7c7925c686a35c7c2193b902b73d (diff) | |
parent | 6437317480713c7d5d9295d1509abe39a0dbfe19 (diff) |
Merge "Critical For Use the original value instead"
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/att/nsa/mr/client/HostSelector.java | 6 |
1 files changed, 5 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 7e92bd8..5a77244 100644 --- a/src/main/java/com/att/nsa/mr/client/HostSelector.java +++ b/src/main/java/com/att/nsa/mr/client/HostSelector.java @@ -144,8 +144,12 @@ public class HostSelector } else { + int index = 0; + int value = new Random().nextInt(); Vector v = new Vector(workingSet); - int index = Math.abs(new Random().nextInt()) % workingSet.size(); + if(value!=0) { + index = Math.abs(value) % workingSet.size(); + } selection = (String)v.elementAt(index); } |