From eb06c3532c133a9126bd45c5485087edf5e3ad54 Mon Sep 17 00:00:00 2001 From: huaxing Date: Fri, 10 Apr 2020 13:16:12 +0800 Subject: Fix sonar issues Issue-ID: POLICY-1913 Signed-off-by: huaxing Change-Id: Id1a9a6b6f7a9c8c74dd69bd0d30af05162a92cd1 --- .../apex/testsuites/integration/common/model/java/DefaultTaskLogic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuites/integration/integration-common') diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/java/DefaultTaskLogic.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/java/DefaultTaskLogic.java index 3730bba47..33f88bf2d 100644 --- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/java/DefaultTaskLogic.java +++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/java/DefaultTaskLogic.java @@ -30,6 +30,7 @@ import org.onap.policy.apex.core.engine.executor.context.TaskExecutionContext; */ public class DefaultTaskLogic { private static final int BOUND_FOR_RANDOM_INT = 4; + private static final Random rand = new Random(); /** * Gets the event. @@ -46,7 +47,6 @@ public class DefaultTaskLogic { String inFieldsString = executor.inFields.toString(); executor.logger.debug(inFieldsString); - final Random rand = new Random(); if (executor.inFields.containsKey("TestDecideCaseSelected")) { executor.outFields.put("TestActCaseSelected", (byte) rand.nextInt(BOUND_FOR_RANDOM_INT)); executor.outFields.put("TestActStateTime", System.nanoTime()); -- cgit 1.2.3-korg