Iterates over the configuration parameters and either logs a warning, or throws an exception for any parameter that does not have a matching setter in this filter. @param filterConfig The configuration information associated with the filter instance being initialised @throws ServletException if {@
(FilterConfig filterConfig)
| 61 | * not have a matching setter |
| 62 | */ |
| 63 | @Override |
| 64 | public void init(FilterConfig filterConfig) throws ServletException { |
| 65 | Enumeration<String> paramNames = filterConfig.getInitParameterNames(); |
| 66 | while (paramNames.hasMoreElements()) { |
| 67 | String paramName = paramNames.nextElement(); |
| 68 | if (!IntrospectionUtils.setProperty(this, paramName, filterConfig.getInitParameter(paramName))) { |
| 69 | String msg = sm.getString("filterbase.noSuchProperty", paramName, this.getClass().getName()); |
| 70 | if (isConfigProblemFatal()) { |
| 71 | throw new ServletException(msg); |
| 72 | } else { |
| 73 | getLogger().warn(msg); |
| 74 | } |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Determines if an exception when calling a setter or an unknown configuration attribute triggers the failure of |
nothing calls this directly
no test coverage detected