static void throwIfUnrecognizedParamName ( Enumeration initParamNames ) throws ServletException { final Set < String > recognizedParameterNames = new HashSet < String > ( ) ; recognizedParameterNames . add ( ALLOW_MULTI_VALUED_PARAMETERS ) ; recognizedParameterNames . add ( PARAMETERS_TO_CHECK ) ; recognizedParameterNames . add ( CHARACTERS_TO_FORBID ) ; while ( initParamNames . hasMoreElements ( ) ) { final String initParamName = ( String ) initParamNames . nextElement ( ) ; if ( ! recognizedParameterNames . contains ( initParamName ) ) { throw new ServletException ( "Unrecognized init parameter [" + initParamName + "]. Failing safe. Typo" + " in the web.xml configuration? " + " Misunderstanding about the configuration " + RequestParameterPolicyEnforcementFilter . class . getSimpleName ( ) + " expects?" ) ; } } }
Examines the Filter init parameter names and throws ServletException if they contain an unrecognized init parameter name .