code: @Override
      public void registerFilter(Filter filter, String pattern, Dictionary initParams, int ranking, HttpContext context) throws ServletException {
          if (filter == null) {
              throw new IllegalArgumentException("Filter must not be null");
          }
          FilterHandler handler = new FilterHandler(getServletContext(context), filter, pattern, ranking);
          handler.setInitParams(initParams);
          synchronized (filterLock) {
              container.getHandlerRegistry().addFilter(handler);
              this.localFilters.add(filter);
          }
      }
docs: {@inheritDoc}