X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fadmin%2FPolicyManagerServlet.java;h=a99d23ed58cffbe98e8de7e0993d6deecdd655dd;hb=e0385921034ae9ce860038ea65d2d13259f7cc4c;hp=b4817147c19bb0c5458ca8bb68278f13a9471041;hpb=59e3ddb0f0698965962a7d5879a6e39a80744648;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java index b4817147c..a99d23ed5 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java @@ -736,8 +736,7 @@ public class PolicyManagerServlet extends HttpServlet { el.put("modifiedBy", getUserName(policy.getModifiedBy())); resultList.add(el); } - }else if(!scopes.isEmpty()){ - if(scopes.contains(scopeNameValue)){ + }else if(!scopes.isEmpty() && scopes.contains(scopeNameValue)){ JSONObject el = new JSONObject(); el.put("name", policy.getPolicyName().substring(policy.getPolicyName().lastIndexOf(File.separator)+1)); el.put("date", policy.getModifiedDate()); @@ -747,7 +746,6 @@ public class PolicyManagerServlet extends HttpServlet { el.put("createdBy", getUserName(policy.getCreatedBy())); el.put("modifiedBy", getUserName(policy.getModifiedBy())); resultList.add(el); - } } } } @@ -1460,7 +1458,7 @@ public class PolicyManagerServlet extends HttpServlet { validateName = name; } if(!name.isEmpty()){ - String validate = PolicyUtils.emptyPolicyValidator(validateName); + String validate = PolicyUtils.policySpecialCharValidator(validateName); if(!validate.contains("success")){ return error(validate); }