summaryrefslogtreecommitdiffstats
path: root/ONAP-PDP-REST
diff options
context:
space:
mode:
authoruj426b <uj426b@att.com>2019-03-21 22:02:04 -0400
committeruj426b <uj426b@att.com>2019-04-04 17:14:26 -0400
commite1fe7fcff0568f6376c3392ddf761b3aa0601587 (patch)
tree86d8840b2ee7c8c52806dff7a5e62831117dd469 /ONAP-PDP-REST
parentd5f95d08ffd3f2e16b67aadae7007c7a51dfae19 (diff)
Auditing User Operations Push or Delete Policies.
Change-Id: I39d5fc01e68e9d711c5dd09790dc34beb68783c3 Issue-ID: POLICY-1421 Signed-off-by: uj426b <uj426b@att.com>
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 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;