Interceptor that changes resolution still executes before and after methods in
original resolution
--------------------------------------------------------------------------------------------------
Key: STS-829
URL: http://www.stripesframework.org/jira/browse/STS-829
Project: Stripes
Issue Type: Bug
Components: Context Management
Affects Versions: Release 1.5.6
Reporter: Tyler Elliott
Priority: Minor
I have an interceptor that makes sure that a user can view a particular action
bean and or event:
@Intercepts({LifecycleStage.HandlerResolution})
public class ForceLogin implements Interceptor {
@Override public Resolution intercept(ExecutionContext context)
throws Exception {
Resolution originalResolution = context.proceed(); //this makes
sure event is populated
ActionBean actionBean = (ActionBean) context.getActionBean();
String event = context.getActionBeanContext().getEventName();
if (needsToLogin(actionBean, event)) {
return new RedirectResolution(LoginActionBean.class);
}
return originalResolution;
}
}
In my original (non-login) action bean, I've defined a before method:
@Before(stages = LifecycleStage.ResolutionExecution)
public void foobar() {
foobar.getPumped();
}
Binding and validation never happened for that action bean, so foobar is null.
Shouldn't matter though, because we have a new resolution. But for some reason,
when executing the new resolution, this before method is getting executed.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development