public void checkRoles(PrincipalCollection principals, Collection<String> roles) throws AuthorizationException {
        //SHIRO-234 - roles.toArray() -> roles.toArray(new String[roles.size()])
        if (roles != null && !roles.isEmpty()) {
            checkRoles(principals, roles.toArray(new String[roles.size()]));
        }
    }
Calls {@link #checkRoles(PrincipalCollection principals, String... roles)
checkRoles(PrincipalCollection principals, String... roles) }.
core/src/main/java/org/apache/shiro/authz/ModularRealmAuthorizer.java