-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the event that the DeserializingObserver is listening to #425
Comments
Thank you for reporting @renatorroliveira! I'll do some tests |
As discussed in #366, we need to review events fired on each request. |
Yeah, but i think this bug should be corrected as soon as possible. |
@renatorroliveira, may you test with this PR (#426) code? |
just explaining, |
I will test as soon as i got home today. |
you're right @renatorroliveira! rs. I'll fix in there, thanks again |
I think it should be the DeserializingObserver listening to EndOfInterceptorStack and the MethodValidator listening to ReadyToExecuteMethod. |
I'm adding a new event, because in this case it will be really necessary. |
I have commited some weeks ago a similar case: https://github.com/garcia-jj/vraptor4/commits/ot-rejectednewobservers. May be you can do somethink like this, if you want. |
@renatorroliveira, can you test now? (with #427 changes) |
thanks @garcia-jj. |
@renatorroliveira, we replace #427 solution with #430. |
I will try to do some tests, i don't know how to get the specific code of the pull request, but i will look for it. |
I've got the branch code. I will do some tests now. |
thanks @renatorroliveira! If you need any help, just let me know =) |
great @renatorroliveira! I'll merge this PR, and it will close the issue automatically |
Deserializing observing StackStarting. Closes #425
Hello guys,
I am suggesting to change the event that the DeserializingObserver is listening to.
Today it is listening to the ReadyToExecuteMethod, which is the same event that the MethodValidator is listening.
This is producing a bug in the validator. This happens because with the CDI events we can't guarantee the order of the listerner's execution. So, in my tests, when i receive the parameters of my controller's method via JSON, i annotated the method with @consumes. However, the listener of the MethodValidator is beeing executed before the DeserializingObserver. So, when i call validator.onError... it always acuses validation errors, because the validation is occurring before the processing of parameters.
So, the DeserializingObserver should be listening to another event, an event that occurs before the ReadyToExecuteMethod. It could be an existent or even a new event.
Regards
The text was updated successfully, but these errors were encountered: