Skip to content

Commit

Permalink
fix: possibly unnecessary method call
Browse files Browse the repository at this point in the history
  • Loading branch information
klaus-sap committed Oct 18, 2023
1 parent d02780e commit 931f880
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ private Set<ScimGroup> getDefaultUserGroups(String zoneId) {
return emptySet();
}
IdentityZone currentZone = IdentityZoneHolder.get();
List<String> zoneDefaultGroups = currentZone.getConfig().getUserConfig().getDefaultGroups();
if (!zoneId.equals(currentZone.getId())) {
zoneDefaultGroups = zoneProvisioning.retrieve(zoneId).getConfig().getUserConfig().getDefaultGroups();
}
List<String> zoneDefaultGroups = (zoneId.equals(currentZone.getId())) ?
currentZone.getConfig().getUserConfig().getDefaultGroups() :
zoneProvisioning.retrieve(zoneId).getConfig().getUserConfig().getDefaultGroups();
return zoneDefaultGroups
.stream()
.map(groupName -> createOrGetGroup(groupName, zoneId))
Expand Down

0 comments on commit 931f880

Please sign in to comment.