From fc5c07705edc4dcb7083b39116a43844bb6a1490 Mon Sep 17 00:00:00 2001 From: Ravindra Bakkamanthala Date: Mon, 5 Jun 2017 22:42:02 -0400 Subject: Fixed the Policy API issues and Bugfixes Change-Id: I6e8b54442421b6ebd0ff88426fc6e5f3a36b0690 Signed-off-by: Ravindra Bakkamanthala --- .../openecomp/policy/pap/xacml/rest/components/AutoPushPolicy.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/AutoPushPolicy.java') diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/AutoPushPolicy.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/AutoPushPolicy.java index b9ed78ef6..b658483d2 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/AutoPushPolicy.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/AutoPushPolicy.java @@ -136,9 +136,7 @@ public class AutoPushPolicy { //Get the current policies from the Group and Add the new one Set currentPoliciesInGroup = pdpGroup.getPolicies(); Set policies = new HashSet<>(); - if(policy!=null){ - policies.add(policy); - } + policies.add(policy); pdpGroup.copyPolicyToFile(policyId, new FileInputStream(Paths.get(policyToCreateUpdate).toFile())); //If the selected policy is in the group we must remove it because the name is default Iterator policyIterator = policies.iterator(); -- cgit 1.2.3-korg