public static boolean hasFilter ( Filter filter ) { Jenkins j = Jenkins . getInstanceOrNull ( ) ; PluginServletFilter container = null ; if ( j != null ) { container = getInstance ( j . servletContext ) ; } if ( j == null || container == null ) { return LEGACY . contains ( filter ) ; } else { return container . list . contains ( filter ) ; } }
Checks whether the given filter is already registered in the chain .