[
https://issues.apache.org/jira/browse/WW-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin updated WW-5578:
-----------------------
Description:
Interceptors which have initialization errors; e.g. maybe they are supplied by
Spring and they have missing dependencies, are simply skipped instead of
throwing a configuration error. See this code in
org.apache.struts2.config.providers.InterceptorBuilder#constructInterceptorReference
{code:java}
try {
Interceptor inter = objectFactory.buildInterceptor(config,
refParams);
result.add(new InterceptorMapping(refName, inter,
refParams));
} catch (ConfigurationException ex) {
LOG.warn(new ParameterizedMessage("Unable to load config
class {} at {} probably due to a missing jar, which might be fine if you never
plan to use the {} interceptor",
config.getClassName(), ex.getLocation(),
config.getName()), ex);
}
{code}
This could result in an only-partially working application. Failing fast is
generally preferred in order to be certain that everything is actually working
as its been configured.
> Bad interceptor configuration is masked
> ---------------------------------------
>
> Key: WW-5578
> URL: https://issues.apache.org/jira/browse/WW-5578
> Project: Struts 2
> Issue Type: Bug
> Reporter: Martin
> Priority: Major
>
> Interceptors which have initialization errors; e.g. maybe they are supplied
> by Spring and they have missing dependencies, are simply skipped instead of
> throwing a configuration error. See this code in
> org.apache.struts2.config.providers.InterceptorBuilder#constructInterceptorReference
> {code:java}
> try {
> Interceptor inter =
> objectFactory.buildInterceptor(config, refParams);
> result.add(new InterceptorMapping(refName, inter,
> refParams));
> } catch (ConfigurationException ex) {
> LOG.warn(new ParameterizedMessage("Unable to load
> config class {} at {} probably due to a missing jar, which might be fine if
> you never plan to use the {} interceptor",
> config.getClassName(), ex.getLocation(),
> config.getName()), ex);
> }
> {code}
> This could result in an only-partially working application. Failing fast is
> generally preferred in order to be certain that everything is actually
> working as its been configured.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)