aboutsummaryrefslogtreecommitdiffstats
path: root/feature-lifecycle
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2021-06-14 17:20:51 -0500
committerjhh <jorge.hernandez-herrero@att.com>2021-06-14 17:20:51 -0500
commit0945bc95ad1eb147c1ddf3d2069ad9a531838649 (patch)
treebe94e922aea3e58d97a5251597428c0a995bd04a /feature-lifecycle
parented08c7f8d6d124cc3a6a42a5b630d549a5b34968 (diff)
Use re2j pattern for sonar vulnerabilities
Issue-ID: POLICY-3289 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id6d58b5c8ac5f7715286f21274ccf5eea9155fd2
Diffstat (limited to 'feature-lifecycle')
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
index 5882025a..0e602ec5 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
@@ -21,6 +21,7 @@
package org.onap.policy.drools.lifecycle;
+import com.google.re2j.Pattern;
import java.lang.reflect.InvocationTargetException;
import java.time.Instant;
import java.util.ArrayList;
@@ -82,6 +83,7 @@ public class LifecycleFsm implements Startable {
public static final long DEFAULT_STATUS_TIMER_SECONDS = 120L;
private static final Logger logger = LoggerFactory.getLogger(LifecycleFsm.class);
+ private static final Pattern COMMA_SPACE_PAT = Pattern.compile("\\s*,\\s*");
protected static final String CONFIGURATION_PROPERTIES_NAME = "feature-lifecycle";
protected static final String GROUP_NAME = "lifecycle.pdp.group";
@@ -171,7 +173,7 @@ public class LifecycleFsm implements Startable {
String commaSeparatedPolicyTypes = properties.getProperty(MANDATORY_POLICY_TYPES);
if (!StringUtils.isBlank(commaSeparatedPolicyTypes)) {
- Collections.addAll(mandatoryPolicyTypes, commaSeparatedPolicyTypes.split("\\s*,\\s*"));
+ Collections.addAll(mandatoryPolicyTypes, COMMA_SPACE_PAT.split(commaSeparatedPolicyTypes));
}
logger.info("The mandatory Policy Types are {}. Compliance is {}",