summaryrefslogtreecommitdiffstats
path: root/ONAP-PDP-REST
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-PDP-REST')
-rw-r--r--ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/DeletePolicyService.java4
1 files changed, 2 insertions, 2 deletions
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 47569a8c4..a004330f6 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
@@ -172,7 +172,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;
}
@@ -250,7 +250,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;