aboutsummaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider/src
diff options
context:
space:
mode:
Diffstat (limited to 'resource-assignment/provider/src')
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/SynchronizedFunction.java4
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 f4df81b8..9cce17a4 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);
}
}