summaryrefslogtreecommitdiffstats
path: root/ONAP-PDP-REST/src/main/java
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-04-06 15:56:14 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-06 15:56:14 +0000
commit6da5838f43a4bf0dc8786c539f9a9aa521139e55 (patch)
treec3ae3fadda19be89a39ddd87e9f2ec0da8de0382 /ONAP-PDP-REST/src/main/java
parent6a4266db5ce20717f787dff410839281e92bb081 (diff)
parente1fe7fcff0568f6376c3392ddf761b3aa0601587 (diff)
Merge "Auditing User Operations Push or Delete Policies."
Diffstat (limited to 'ONAP-PDP-REST/src/main/java')
-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 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;