protected Ini createIni(String configLocation, boolean required) throws ConfigurationException {

        Ini ini = null;

        if (configLocation != null) {
            ini = convertPathToIni(configLocation, required);
        }
        if (required && CollectionUtils.isEmpty(ini)) {
            String msg = "Required configuration location '" + configLocation + "' does not exist or did not "
                    + "contain any INI configuration.";
            throw new ConfigurationException(msg);
        }

        return ini;
    }
Creates an {@link Ini} instance reflecting the specified path, or {@code null} if the path does not exist and
is not required.
<p/>
If the path is required and does not exist or is empty, a {@link ConfigurationException} will be thrown.

@param configLocation the resource path to load into an {@code Ini} instance.
@param required       if the path must exist and be converted to a non-empty {@link Ini} instance.
@return an {@link Ini} instance reflecting the specified path, or {@code null} if the path does not exist and
is not required.
@throws ConfigurationException if the path is required but results in a null or empty Ini instance.
web/src/main/java/org/apache/shiro/web/env/IniWebEnvironment.java