Source:
<code>public void intercept(InterceptorStack stack, ControllerMethod method, Object controllerInstance) throws InterceptionException { try { Method reflectionMethod = method.getMethod(); Object[] parameters = this.info.getParameters(); log.debug("Invoking {}", Stringnifier.simpleNameFor(reflectionMethod)); Object result = methodExecutor.invoke(reflectionMethod, controllerInstance, parameters); if (validator.hasErrors()) { if (log.isDebugEnabled()) { try { validator.onErrorUse(nothing()); } catch (ValidationException e) { log.debug("Some validation errors occured: {}", e.getErrors()); } } throw new InterceptionException( "There are validation errors and you forgot to specify where to go. Please add in your method " + "something like:\n" + "validator.onErrorUse(page()).of(AnyController.class).anyMethod();\n" + "or any view that you like.\n" + "If you didn't add any validation error, it is possible that a conversion error had happened."); } if (reflectionMethod.getReturnType().equals(Void.TYPE)) { <START> this.info.setResult("ok"); <END> } else { this.info.setResult(result); Type returnType = reflectionMethod.getGenericReturnType(); outjectResultEvent.fire(new OutjectResultEvent(returnType)); } stack.next(method, controllerInstance); } catch (IllegalArgumentException e) { throw new InterceptionException(e); } catch (MethodExecutorException e) { throwIfNotValidationException(e, new ApplicationLogicException("your controller raised an exception", e.getCause())); } catch (Exception e) { throwIfNotValidationException(e, new InterceptionException(e)); } }</code><technical_language>I remove setResult(ok) soon, for compatibility vraptor 2x</technical_language>

Target:
public void intercept(InterceptorStack stack, ControllerMethod method, Object controllerInstance) throws InterceptionException { try { Method reflectionMethod = method.getMethod(); Object[] parameters = this.info.getParameters(); log.debug("Invoking {}", Stringnifier.simpleNameFor(reflectionMethod)); Object result = methodExecutor.invoke(reflectionMethod, controllerInstance, parameters); if (validator.hasErrors()) { if (log.isDebugEnabled()) { try { validator.onErrorUse(nothing()); } catch (ValidationException e) { log.debug("Some validation errors occured: {}", e.getErrors()); } } throw new InterceptionException( "There are validation errors and you forgot to specify where to go. Please add in your method " + "something like:\n" + "validator.onErrorUse(page()).of(AnyController.class).anyMethod();\n" + "or any view that you like.\n" + "If you didn't add any validation error, it is possible that a conversion error had happened."); } if (!reflectionMethod.getReturnType().equals(Void.TYPE)) { this.info.setResult(result); Type returnType = reflectionMethod.getGenericReturnType(); outjectResultEvent.fire(new OutjectResultEvent(returnType)); } stack.next(method, controllerInstance); } catch (IllegalArgumentException e) { throw new InterceptionException(e); } catch (MethodExecutorException e) { throwIfNotValidationException(e, new ApplicationLogicException("your controller raised an exception", e.getCause())); } catch (Exception e) { throwIfNotValidationException(e, new InterceptionException(e)); } }