MCPcopy Create free account
hub / github.com/apache/tomcat / init

Method init

java/org/apache/catalina/filters/FilterBase.java:63–77  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 10

setPropertyMethod · 0.95
isConfigProblemFatalMethod · 0.95
getLoggerMethod · 0.95
getInitParameterNamesMethod · 0.65
getInitParameterMethod · 0.65
getStringMethod · 0.65
getNameMethod · 0.65
warnMethod · 0.65
hasMoreElementsMethod · 0.45
nextElementMethod · 0.45

Tested by

no test coverage detected