Skip to content

Commit

Permalink
feat: make the qualifiedName list unique
Browse files Browse the repository at this point in the history
  • Loading branch information
sumandas0 committed Jul 24, 2024
1 parent 39e04ea commit 8786dd0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private Map<String, Object> getFilterForPurpose(AtlasEntity purpose) throws Atla

private void personaPolicyToESDslClauses(List<AtlasEntity> policies,
List<Map<String, Object>> allowClauseList) throws AtlasBaseException {
List<String> terms = new ArrayList<>();
Set<String> terms = new HashSet<>();
Set<String> glossaryQualifiedNames =new HashSet<>();

for (AtlasEntity policy: policies) {
Expand Down Expand Up @@ -249,8 +249,8 @@ private void personaPolicyToESDslClauses(List<AtlasEntity> policies,
}
}

allowClauseList.add(mapOf("terms", mapOf(QUALIFIED_NAME, terms)));

allowClauseList.add(mapOf("terms", mapOf(QUALIFIED_NAME, new ArrayList<>(terms))));
if (CollectionUtils.isNotEmpty(glossaryQualifiedNames)) {
allowClauseList.add(mapOf("terms", mapOf(GLOSSARY_PROPERTY_KEY, new ArrayList<>(glossaryQualifiedNames))));
}
Expand Down

0 comments on commit 8786dd0

Please sign in to comment.