diff options
Diffstat (limited to 'resource-assignment')
-rw-r--r-- | resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/SynchronizedFunction.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/SynchronizedFunction.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/SynchronizedFunction.java index f4df81b8b..9cce17a46 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/SynchronizedFunction.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/SynchronizedFunction.java @@ -21,6 +21,7 @@ package org.onap.ccsdk.sli.adaptors.lock.comp; +import java.security.SecureRandom; import java.util.Collection; import java.util.HashSet; import java.util.Set; @@ -51,6 +52,7 @@ public abstract class SynchronizedFunction { } private static String generateLockRequester() { - return "SynchronizedFunction-" + (int) (Math.random() * 1000000); + SecureRandom rand = new SecureRandom(); + return "SynchronizedFunction-" + (int) (rand.nextDouble() * 1000000); } } |