X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PDP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdp%2Frest%2Fapi%2Fservices%2FDeletePolicyService.java;h=4f7384b3d3ffb5d898196b315d0bf18a0756d54b;hb=e1fe7fcff0568f6376c3392ddf761b3aa0601587;hp=ff0ac826f103c37671f7479519fe6f14b97541f6;hpb=c72526cde70d6b2899d9e4bbc40e096e0ecf1b7d;p=policy%2Fengine.git diff --git a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/DeletePolicyService.java b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/DeletePolicyService.java index ff0ac826f..4f7384b3d 100644 --- a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/DeletePolicyService.java +++ b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/DeletePolicyService.java @@ -173,7 +173,7 @@ public class DeletePolicyService extends PdpApiService { */ private boolean populateFullPolicyName(final PAPServices papServices) { for (PolicyNameType policyData : policyList) { - if (policyData.getPolicyName().contains("xml")) { + if (policyData.getPolicyName().endsWith("xml")) { policyData.setFullPolicyName(policyData.getPolicyName()); continue; } @@ -251,7 +251,7 @@ public class DeletePolicyService extends PdpApiService { if ("PAP".equalsIgnoreCase(deletePolicyParameters.getPolicyComponent()) && (deletePolicyParameters.getDeleteCondition() == null - || deletePolicyParameters.getDeleteCondition().toString().trim().isEmpty())) { + || StringUtils.isBlank(deletePolicyParameters.getDeleteCondition().toString()))) { message = XACMLErrorConstants.ERROR_DATA_ISSUE + "No Delete Condition given."; LOGGER.warn(message + PRINT_REQUESTID + requestId); return false;