diff --git a/georchestra-integration/externalized-accounts/src/main/java/org/geonetwork/security/external/integration/RolesBasedGroupSynchronizer.java b/georchestra-integration/externalized-accounts/src/main/java/org/geonetwork/security/external/integration/RolesBasedGroupSynchronizer.java index 4fc3f0263d..ea2c163f8b 100644 --- a/georchestra-integration/externalized-accounts/src/main/java/org/geonetwork/security/external/integration/RolesBasedGroupSynchronizer.java +++ b/georchestra-integration/externalized-accounts/src/main/java/org/geonetwork/security/external/integration/RolesBasedGroupSynchronizer.java @@ -71,7 +71,7 @@ public RolesBasedGroupSynchronizer(CanonicalAccountsRepository canonicalAccounts */ public @Override List fetchCanonicalGroups() { List roles = canonicalAccounts.findAllRoles(); - Stream matches = roles.stream().filter(this::notMatchesGeorchestraDefaultRoleNameFilter).filter(this::matchesRoleNameFilter); + Stream matches = roles.stream().filter(this::doesNotMatchesGeorchestraDefaultRoleNameFilter).filter(this::matchesRoleNameFilter); return matches.map(this::renameRoleUsingConfigPattern).collect(Collectors.toList()); } @@ -92,7 +92,7 @@ private CanonicalGroup renameRoleUsingConfigPattern(CanonicalGroup role) { } protected @Override List resolveGroupsOf(CanonicalUser user) { - Stream roleNames = user.getRoles().stream().filter(this::notMatchesGeorchestraDefaultRoleNameFilter).filter(config::matchesRoleNameFilter); + Stream roleNames = user.getRoles().stream().filter(this::doesNotMatchesGeorchestraDefaultRoleNameFilter).filter(config::matchesRoleNameFilter); Stream roleGroups = roleNames.map(role -> this.externalGroupLinks.findByName(role)// .map(GroupLink::getCanonical)// @@ -114,14 +114,14 @@ private boolean matchesRoleNameFilter(CanonicalGroup role) { return config.matchesRoleNameFilter(name); } - private boolean notMatchesGeorchestraDefaultRoleNameFilter(String roleName) { + private boolean doesNotMatchesGeorchestraDefaultRoleNameFilter(String roleName) { requireNonNull(roleName); return !georchestraDefaultRoleNames.contains(roleName); } - private boolean notMatchesGeorchestraDefaultRoleNameFilter(CanonicalGroup role) { + private boolean doesNotMatchesGeorchestraDefaultRoleNameFilter(CanonicalGroup role) { requireNonNull(role); - return notMatchesGeorchestraDefaultRoleNameFilter(role.getName()); + return doesNotMatchesGeorchestraDefaultRoleNameFilter(role.getName()); } }