summaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider/src/main
diff options
context:
space:
mode:
authorprakash.e <prakash.e@huawei.com>2018-04-12 11:43:49 +0530
committerprakash.e <prakash.e@huawei.com>2018-04-12 11:44:05 +0530
commitdd8b9956c7f3a10b141e26ccd8b14c79ddb619a9 (patch)
tree35c0099110705919c2d24988057cde9fd7ae757a /resource-assignment/provider/src/main
parent38f19a5a293a21bc7700ea715a5f77755b2d08e3 (diff)
Used secure random number generation
Issue-ID: CCSDK-184 Change-Id: I00719fb778a6ab7dc964bb1e4710a9014ba51fcd Signed-off-by: prakash.e <prakash.e@huawei.com>
Diffstat (limited to 'resource-assignment/provider/src/main')
-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);
}
}