summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpa834y <pa834y@att.com>2018-03-09 12:13:30 -0500
committerpa834y <pa834y@att.com>2018-03-09 12:17:51 -0500
commit074fcb2a278ee411f4eb19c7bf860d345c4512a7 (patch)
tree8a7bb22c4ba7b9bacec1e76de5bfcca34cda702c
parent1b075974ac392877c531f81f5d84a61b92080b05 (diff)
Fix brmsgw regex handling for dependecies
Issue-ID: POLICY-684 Change-Id: I3a8fbbaebf4fdfcd097edcc367e06ef8807aa3bc Signed-off-by: pa834y <pa834y@att.com>
-rw-r--r--BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java b/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java
index fd864fded..a1113f53d 100644
--- a/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java
+++ b/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java
@@ -46,6 +46,7 @@ import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+import java.util.regex.Pattern;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
@@ -423,7 +424,7 @@ public class BRMSPush {
} else if ("$dependency$".equals(key) && value.startsWith("[") && value.endsWith("]")) {
value = value.substring(1, value.length() - 1).trim();
- List<String> dependencyStrings = Arrays.asList(value.split("},{"));
+ List<String> dependencyStrings = Arrays.asList(value.split(Pattern.quote("},{")));
for (String dependencyString : dependencyStrings) {
try {
userDependencies
@@ -452,7 +453,7 @@ public class BRMSPush {
// closedLoop
if (kSessionName == null) {
LOGGER.info("kSessionName is null, selectedName is : " + selectedName );
- if (selectedName == defaultName) {
+ if (selectedName.equalsIgnoreCase(defaultName)) {
kSessionName = "closedloop";
} else {
kSessionName = "closedloop-" + selectedName;