protected SecurityManager createInstance(Ini ini) {
        if (CollectionUtils.isEmpty(ini)) {
            throw new NullPointerException("Ini argument cannot be null or empty.");
        }
        SecurityManager securityManager = createSecurityManager(ini);
        if (securityManager == null) {
            String msg = SecurityManager.class + " instance cannot be null.";
            throw new ConfigurationException(msg);
        }
        return securityManager;
    }
Creates a new instance.  See the {@link #getInstance()} JavaDoc for detailed explanation of how an INI
source will be resolved to use to build the instance.
core/src/main/java/org/apache/shiro/ini/IniSecurityManagerFactory.java