I think the "ADMIN" must be buggy, as the role is "ROLE_ADMIN" -> can use the AuthoritiesConstants.ADMIN constant instead ? This would prevent the issue, and look better in Sonar!