1. Yes, Alessio is definitely the correct person to ask. Totally. ;-D
2. I concur with Rebecca.
3. Also, there's an invisible twist. When running in the context of CDI, field injection occurs only after a method is invoked on an object. That's why org.jboss.resteasy.plugins.validation.GeneralValidatorImpl.validateAllParameters() (in module resteasy-validator-provider-11) tests
before throwing a ResteasyViolationException. It also explains the presence of a validate() method in org.jboss.resteasy.cdi.JaxrsInjectionTarget (in module resteasy-cdi). So, in the presence of CDI,
in MethodInjectorImpl DOES get called, but, if there are any violations, JaxrsInjectionTarget.validate() will call GeneralValidatorImpl.checkViolationsfromCDI(), which will throw a ResteasyViolationException before invoking the actual method.result = invokedMethod.invoke(resource, args);
I've reviewed the code. I do not find that a method with a validation error is called. The validation error is thrown. It is captured and returned to the caller in the Response object as an HTTP 400 error.
On Wed, Oct 25, 2017 at 5:26 AM, Alessio Soldano <firstname.lastname@example.org> wrote:
AlessioCheersHi John,sorry, I'm a bit busy atm, anyway I'm forwarding your email to the resteasy-dev list. We'll get back to you.
On Tue, Oct 24, 2017 at 11:59 AM, John O'Hara <email@example.com> wrote:
I am not sure if you are the correct person to ask, if not please let me if there is someone more appropriate to ask.
I have been investigating some unexpected behaviour in how entity validations exceptions are propagated through WF/EAP when http post requests are made via rest endpoints.
One thing I have noticed in the resteasy-jaxrs module is that in org.jboss.resteasy.core.Met
hodInjectorImpl.invoke() the method parameters are validated , but the method is still invoked, irrespective of the outcome of the call to the validator 
Is there is a possibility of failing a method invocation after the validation call , so that we do not invoke the method, which ends up failing anyway due to validation exceptions?
y/Resteasy/blob/master/resteas y-jaxrs/src/main/java/org/ jboss/resteasy/core/MethodInje ctorImpl.java#L119
resteasy-dev mailing list
_______________________________________________ resteasy-dev mailing list firstname.lastname@example.org https://lists.jboss.org/mailman/listinfo/resteasy-dev
-- My company's smarter than your company (unless you work for Red Hat)