Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Release 1.5.6
-
Fix Version/s: None
-
Component/s: Context Management
-
Labels:None
Description
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.