code: public Filter getFilter(ServletConfig servletConfig) throws ServletException {
          synchronized (filterCache) {
              Filter f = filterCache.get(servletConfig);
              if (f == null) {
                  DefaultConfigurableFilterConfig filterConfig = new DefaultConfigurableFilterConfig(servletConfig);
                  f = factory.createFilter(filterConfig);
                  if (maintainLifeCycle) {
                      f.init(filterConfig);
                  }
                  filterCache.put(servletConfig, f);
              }
              return f;
          }
  
      }
docs: <p>getFilter.</p>
  
  @param servletConfig a {@link javax.servlet.ServletConfig} object.
  @return a {@link javax.servlet.Filter} object.
  @throws javax.servlet.ServletException if any.