static void throwIfUnrecognizedParamName(final Enumeration initParamNames) {
        final Set<String> recognizedParameterNames = new HashSet<String>();
        recognizedParameterNames.add(INIT_PARAM_ENABLE_CACHE_CONTROL);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_XCONTENT_OPTIONS);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_STRICT_TRANSPORT_SECURITY);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_STRICT_XFRAME_OPTIONS);
        recognizedParameterNames.add(INIT_PARAM_STRICT_XFRAME_OPTIONS);
        recognizedParameterNames.add(INIT_PARAM_CONTENT_SECURITY_POLICY);
        recognizedParameterNames.add(LOGGER_HANDLER_CLASS_NAME);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_XSS_PROTECTION);
        recognizedParameterNames.add(INIT_PARAM_XSS_PROTECTION);

        while (initParamNames.hasMoreElements()) {
            final String initParamName = (String) initParamNames.nextElement();
            if (!recognizedParameterNames.contains(initParamName)) {
                FilterUtils.logException(LOGGER, new ServletException("Unrecognized init parameter [" + initParamName + "].  Failing safe.  Typo" +
                    " in the web.xml configuration? " +
                    " Misunderstanding about the configuration "
                    + RequestParameterPolicyEnforcementFilter.class.getSimpleName() + " expects?"));
            }
        }
    }
static void throwIfUnrecognizedParamName(final Enumeration initParamNames) {
        final Set<String> recognizedParameterNames = new HashSet<String>();
        recognizedParameterNames.add(INIT_PARAM_ENABLE_CACHE_CONTROL);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_XCONTENT_OPTIONS);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_STRICT_TRANSPORT_SECURITY);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_STRICT_XFRAME_OPTIONS);
        recognizedParameterNames.add(INIT_PARAM_STRICT_XFRAME_OPTIONS);
        recognizedParameterNames.add(INIT_PARAM_CONTENT_SECURITY_POLICY);
        recognizedParameterNames.add(LOGGER_HANDLER_CLASS_NAME);
        recognizedParameterNames.add(INIT_PARAM_ENABLE_XSS_PROTECTION);
        recognizedParameterNames.add(INIT_PARAM_XSS_PROTECTION);

        while (initParamNames.hasMoreElements()) {
            final String initParamName = (String) initParamNames.nextElement();
            if (!recognizedParameterNames.contains(initParamName)) {
                FilterUtils.logException(LOGGER, new ServletException("Unrecognized init parameter [" + initParamName + "].  Failing safe.  Typo" +
                    " in the web.xml configuration? " +
                    " Misunderstanding about the configuration "
                    + RequestParameterPolicyEnforcementFilter.class.getSimpleName() + " expects?"));
            }
        }
    }
static void throwIfUnrecognizedParamName ( final Enumeration initParamNames ) { final Set < String > recognizedParameterNames = new HashSet < String > ( ) ; recognizedParameterNames . add ( INIT_PARAM_ENABLE_CACHE_CONTROL ) ; recognizedParameterNames . add ( INIT_PARAM_ENABLE_XCONTENT_OPTIONS ) ; recognizedParameterNames . add ( INIT_PARAM_ENABLE_STRICT_TRANSPORT_SECURITY ) ; recognizedParameterNames . add ( INIT_PARAM_ENABLE_STRICT_XFRAME_OPTIONS ) ; recognizedParameterNames . add ( INIT_PARAM_STRICT_XFRAME_OPTIONS ) ; recognizedParameterNames . add ( INIT_PARAM_CONTENT_SECURITY_POLICY ) ; recognizedParameterNames . add ( LOGGER_HANDLER_CLASS_NAME ) ; recognizedParameterNames . add ( INIT_PARAM_ENABLE_XSS_PROTECTION ) ; recognizedParameterNames . add ( INIT_PARAM_XSS_PROTECTION ) ; while ( initParamNames . hasMoreElements ( ) ) { final String initParamName = ( String ) initParamNames . nextElement ( ) ; if ( ! recognizedParameterNames . contains ( initParamName ) ) { FilterUtils . logException ( LOGGER , 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.
<p>
This is a stateless static method.
<p>
This method is an implementation detail and is not exposed API.
This method is only non-private to allow JUnit testing.

@param initParamNames init param names, in practice as read from the FilterConfig.
Examines the Filter init parameter names and throws ServletException if they contain an unrecognized init parameter name . <p > This is a stateless static method . <p > This method is an implementation detail and is not exposed API . This method is only non - private to allow JUnit testing .