X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ECOMP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcomponents%2FAutoPushPolicy.java;h=b658483d2e90d1d67f6820bcc476b1cb70d6bcf5;hp=b9ed78ef6cfb8082d9c0950fd1f2ebad0602d770;hb=fc5c07705edc4dcb7083b39116a43844bb6a1490;hpb=d9007d680d19734d5dc106479784c420236cca4b 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();