Skip to content

Commit

Permalink
fix Sonar warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
klaus-sap committed Nov 22, 2023
1 parent 6e6ab18 commit 979f933
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ public void setAllowedGroups(List<String> allowedGroups) {
}

// return defaultGroups plus allowedGroups
@SuppressWarnings("java:S1168")
public Set<String> resultingAllowedGroups() {
if (allowedGroups == null) {
return null; // all groups allowed
return null; // null = all groups allowed
} else {
HashSet<String> allAllowedGroups = new HashSet<String>(allowedGroups);
HashSet<String> allAllowedGroups = new HashSet<>(allowedGroups);
if (defaultGroups != null) allAllowedGroups.addAll(defaultGroups);
return allAllowedGroups;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ protected void checkClientIdpAuthorization(BaseClientDetails client, UaaUser use
* @param authorities the users authorities
* @return modified requested scopes adapted according to the rules specified
*/
@SuppressWarnings("java:S1874")
private Set<String> checkUserScopes(Set<String> requestedScopes,
Collection<? extends GrantedAuthority> authorities,
ClientDetails clientDetails) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public ScimGroup create(final ScimGroup group, final String zoneId) throws Inval
+ " is not allowed in Identity Zone " + zoneId);
}
final String id = UUID.randomUUID().toString();
logger.debug("creating new group with id: %s", id);
logger.debug("creating new group with id: {}", id);
try {
validateGroup(group);
jdbcTemplate.update(addGroupSql, ps -> {
Expand Down

0 comments on commit 979f933

Please sign in to comment.