X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FDecisionPolicyController.java;h=fc77c9316815afb3a90fc4383b6e5c26bc19bf1f;hp=45369ce2f5da4b3abb0abb89a0398ad97de14c9b;hb=e0385921034ae9ce860038ea65d2d13259f7cc4c;hpb=e9e7bef3c130f7525a5ad250f365ee910bebe85a diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java index 45369ce2f..fc77c9316 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java @@ -120,6 +120,9 @@ public class DecisionPolicyController extends RestrictedBaseController { // AttributeValueType attributeValue = match.getAttributeValue(); String value = (String) attributeValue.getContent().get(0); + if(value!=null){ + value = value.replaceAll("\\(\\?i\\)", ""); + } AttributeDesignatorType designator = match.getAttributeDesignator(); String attributeId = designator.getAttributeId(); // First match in the target is OnapName, so set that value. @@ -203,13 +206,13 @@ public class DecisionPolicyController extends RestrictedBaseController { YAMLParams yamlParams = new YAMLParams(); for(int i=0; i map = (Map)attributeList.get(i); - if(map.get("key").equals("actor")){ + if("actor".equals(map.get("key"))){ yamlParams.setActor(map.get("value")); - }else if(map.get("key").equals("recipe")){ + }else if("recipe".equals(map.get("key"))){ yamlParams.setRecipe(map.get("value")); - }else if(map.get("key").equals("targets")){ + }else if("target".equals(map.get("key"))){ yamlParams.setTargets(Arrays.asList(map.get("value").split("\\|"))); - }else if(map.get("key").equals("clname")){ + }else if("clname".equals(map.get("key"))){ yamlParams.setClname(map.get("value")); } }