Update MethodInfo with the controller and method that really deal with the request

This is needed because when one controller method redirect or foward to another controller or another method, the MethodInfo remains with the original called method and not with the method that was last called.

For example, if we want to create a js and css renderer based on what controller and method has rendered the page, we need to know the method that rendered the request and not the method that was first called.
So if we rollback this change, were can we update MethodInfo?


2014-08-21 9:17 GMT-03:00 Lucas Cavalcanti <notifications@github.com>:

> In
> vraptor-core/src/main/java/br/com/caelum/vraptor/view/DefaultLogicResult.java:
>
> > @@ -101,10 +100,8 @@ public DefaultLogicResult(Proxifier proxifier, Router router, MutableRequest req
> >  			public Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod) {
> >  				try {
> >  					logger.debug("Executing {}", method);
> > -					ControllerMethod old = methodInfo.getControllerMethod();
>
> This is because we have an interceptor chain:
>
> IntA > Int B > Int C > ExecuteMethod > Int C > Int B > Int A
>
> the repetition is what happens after stack.next(...)
>
> so if we don't change the controller method back, and some interceptor
> uses it after stack next, we'll break the logic.
>
> Therefore, rollback this change, please.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/caelum/vraptor4/pull/746/files#r16535079>.
>