public final void init(FilterConfig filterConfig) throws ServletException {
        setFilterConfig(filterConfig);
        try {
            onFilterConfigSet();
        } catch (Exception e) {
            if (e instanceof ServletException) {
                throw (ServletException) e;
            } else {
                if (LOGGER.isErrorEnabled()) {
                    LOGGER.error("Unable to start Filter: [" + e.getMessage() + "].", e);
                }
                throw new ServletException(e);
            }
        }
    }
Sets the filter's {@link #setFilterConfig filterConfig} and then immediately calls
{@link #onFilterConfigSet() onFilterConfigSet()} to trigger any processing a subclass might wish to perform.

@param filterConfig the servlet container supplied FilterConfig instance.
@throws javax.servlet.ServletException if {@link #onFilterConfigSet() onFilterConfigSet()} throws an Exception.
web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java