Skip to content

Commit

Permalink
Merge pull request #192 from mawinter69/security
Browse files Browse the repository at this point in the history
revert change to Role
  • Loading branch information
mawinter69 authored Jun 23, 2022
2 parents f785874 + 9b5374f commit 13f908e
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* Class representing a role, which holds a set of {@link Permission}s.
* @author Thomas Maurel
*/
public final class Role implements Comparable<Role> {
public final class Role implements Comparable {
public static final String GLOBAL_ROLE_PATTERN = ".*";

private static final Logger LOGGER = Logger.getLogger(Role.class.getName());
Expand Down Expand Up @@ -177,10 +177,14 @@ public Boolean hasAnyPermission(Set<Permission> permissions) {
* @return Comparison of role names
*/
@Override
public int compareTo(@NonNull Role o) {
public int compareTo(@NonNull Object o) {
Objects.requireNonNull(o);

return name.compareTo(((Role)o).name);

if (o instanceof Role) {
return name.compareTo(((Role)o).name);
}

return -1;
}

@Override
Expand Down

0 comments on commit 13f908e

Please sign in to comment.