protected void assertRealmsConfigured() throws IllegalStateException {
        Collection<Realm> realms = getRealms();
        if (realms == null || realms.isEmpty()) {
            String msg = "Configuration error:  No realms have been configured!  One or more realms must be "
                    + "present to execute an authorization operation.";
            throw new IllegalStateException(msg);
        }
    }
Used by the {@link Authorizer Authorizer} implementation methods to ensure that the {@link #setRealms realms}
has been set.  The default implementation ensures the property is not null and not empty.

@throws IllegalStateException if the <tt>realms</tt> property is configured incorrectly.
core/src/main/java/org/apache/shiro/authz/ModularRealmAuthorizer.java