You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2019/12/12 20:52:32 UTC
TOMEE-2753 Bean validation on response with no response entity failing
So this one was a bit weird. A basic service like this:
@GET
@Path("simple")
public void service() {
// no-op; should return a 204 no content
System.out.println("Service invoked");
}
Was failing, as bean validation was kicking in for the response, and
failing because the response doesn't have an entity.
I've tweaked the OutInterceptor added in CxfRsHttpListener to behave a
little more like org.apache.bval.cdi.BValInterceptor#invoke, in that it
checks for any constraints set on the response type.
PR is here: https://github.com/apache/tomee/pull/622
I'll merge it in tomorrow, and run the JAX-RS TCK tests against it.
Certainly some are failing because of this issue, so I'm expecting more to
pass with the fix.
Feedback is welcome.
Jon