diff --git a/src/main/java/sh/libre/scim/core/GroupAdapter.java b/src/main/java/sh/libre/scim/core/GroupAdapter.java index 1351fe0d95..3221f4bb7b 100644 --- a/src/main/java/sh/libre/scim/core/GroupAdapter.java +++ b/src/main/java/sh/libre/scim/core/GroupAdapter.java @@ -20,7 +20,7 @@ import java.util.stream.Stream; public class GroupAdapter extends Adapter { private String displayName; - private Set members = new HashSet(); + private Set members = new HashSet<>(); public GroupAdapter(KeycloakSession session, String componentId) { super(session, componentId, "Group", Logger.getLogger(GroupAdapter.class)); @@ -58,7 +58,7 @@ public class GroupAdapter extends Adapter { setDisplayName(group.getDisplayName().get()); var groupMembers = group.getMembers(); if (groupMembers != null && groupMembers.size() > 0) { - this.members = new HashSet(); + this.members = new HashSet<>(); for (var groupMember : groupMembers) { try { var userMapping = this.query("findByExternalId", groupMember.getValue().get(), "User") diff --git a/src/main/java/sh/libre/scim/core/UserAdapter.java b/src/main/java/sh/libre/scim/core/UserAdapter.java index 582f2a1ece..2b7cfb3914 100644 --- a/src/main/java/sh/libre/scim/core/UserAdapter.java +++ b/src/main/java/sh/libre/scim/core/UserAdapter.java @@ -169,7 +169,7 @@ public class UserAdapter extends Adapter { logger.warn(e); } user.setMeta(meta); - List roles = new ArrayList(); + List roles = new ArrayList<>(); for (var r : this.roles) { var role = new PersonRole(); role.setValue(r); @@ -227,7 +227,7 @@ public class UserAdapter extends Adapter { @Override public Stream getResourceStream() { - Map params = new HashMap() { + Map params = new HashMap<>() { }; return this.session.users().searchForUserStream(realm, params); } diff --git a/src/main/java/sh/libre/scim/event/ScimEventListenerProvider.java b/src/main/java/sh/libre/scim/event/ScimEventListenerProvider.java index 647bec7aee..7597bdfa9a 100644 --- a/src/main/java/sh/libre/scim/event/ScimEventListenerProvider.java +++ b/src/main/java/sh/libre/scim/event/ScimEventListenerProvider.java @@ -28,7 +28,7 @@ public class ScimEventListenerProvider implements EventListenerProvider { private final KeycloakSession session; - private final Map patterns = new HashMap(); + private final Map patterns = new HashMap<>(); public ScimEventListenerProvider(KeycloakSession session) { this.session = session;