public static List<String> getAuthenticatedUserRoles(IdentityProvider identityProvider) {
        List<String> roles = identityProvider != null ? identityProvider.getRoles() : new ArrayList<>();
        
        if (roles == null || roles.isEmpty()) {
            roles = new ArrayList<>();
            roles.add("");
        }
        
        return roles;
    }
public static List < String > getAuthenticatedUserRoles ( IdentityProvider identityProvider ) { List < String > roles = identityProvider != null ? identityProvider . getRoles ( ) : new ArrayList < > ( ) ; if ( roles == null || roles . isEmpty ( ) ) { roles = new ArrayList < > ( ) ; roles . add ( "" ) ; } return roles ; }
to compensate https://hibernate.atlassian.net/browse/HHH-8091 add empty element to the roles in case it's empty