aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorvarun gudisena <vg411h@att.com>2017-12-06 16:01:10 +0000
committerGerrit Code Review <gerrit@onap.org>2017-12-06 16:01:10 +0000
commitb21a9dfab099a90c2ad4187938ee03f7f97ff26e (patch)
tree6c396af85522cfbfd7a2fcc7f9b4aab5218dcb9b /src/main/java/com
parent792f22fe3bcb7c7925c686a35c7c2193b902b73d (diff)
parent6437317480713c7d5d9295d1509abe39a0dbfe19 (diff)
Merge "Critical For Use the original value instead"
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/att/nsa/mr/client/HostSelector.java6
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);
}