Skip to content

Commit

Permalink
fix: unnecessary method call (#2549)
Browse files Browse the repository at this point in the history
* fix sonar issue: Utility classes should not have public constructors

* fix: possibly unnecessary method call

* fix: define Java version

* handle in separate PR
  • Loading branch information
klaus-sap authored Oct 23, 2023
1 parent fe95b5c commit 1bb8a2b
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 1bb8a2b

Please sign in to comment.