diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-05-08 16:45:03 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-05-08 16:45:09 -0400 |
commit | 50c786ff425de405252cccddea7ff776942ef671 (patch) | |
tree | 5d44f134625a4ae2e612ff2f38f22e761a1c6d76 /applications/guard/src/main/java | |
parent | 3f1d47dd8f14a948967f9a2b5b958f5d858c6809 (diff) |
Final blacklist fix for multiple entries
The last change wasn't quite right, this has multiple AndOf's under
a single AnyOf. Multiple AnyOf's are treated as AND's, but what we
really want is a set of OR's.
Issue-ID: POLICY-2490
Change-Id: I7336643302ccf7982c91a9c082d17bcf0adb4ac8
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/guard/src/main/java')
-rw-r--r-- | applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java index 854f3260..8699fec0 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java @@ -492,13 +492,13 @@ public class GuardTranslator implements ToscaPolicyTranslator { // treated as an OR. // TargetType target = new TargetType(); + AnyOfType anyOf = new AnyOfType(); for (Object blacklisted : ((Collection<?>) arrayBlacklisted)) { AllOfType allOf = new AllOfType(); this.addMatch(allOf, blacklisted, ToscaDictionary.ID_RESOURCE_GUARD_TARGETID); - AnyOfType anyOf = new AnyOfType(); anyOf.getAllOf().add(allOf); - target.getAnyOf().add(anyOf); } + target.getAnyOf().add(anyOf); // // Create our rule and add the target // |