As a reader interceptor is to be invoked around the invocation of a message body reader, and as a message body reader is to be invoked for the sole sake of providing a Java entity parameter, and as we do not have a Java entity parameter in this resource method signature, in this particular case the interceptor MUST NOT be called. Hence I would say this is a bug in Jersey.
-Markus
From: jaxrs-dev-bounces@xxxxxxxxxxx [mailto:jaxrs-dev-bounces@xxxxxxxxxxx] On Behalf Of Christian Kaltepoth
Sent: Dienstag, 11. September 2018 07:23
To: jaxrs developer discussions
Subject: [jaxrs-dev] Clarification regarding ReaderInterceptor
Hi all,
I've a quick question and would love to get your feedback.
Let's assume there is ReaderInterceptor like this:
public class MyReaderInterceptor implements ReaderInterceptor {
public Object aroundReadFrom(ReaderInterceptorContext context) {
And the following JAX-RS resource class:
public class SomeResource {
public Response post(@FormParam("foobar") String foobar) {
If a client sends a POST request to the resource and submits the form parameter in the body, would you expect the ReaderInterceptor to get invoked or not?
I'm asking because JAX-RS implementations handle this case differently. Jersey and RESTEasy seem to invoke the interceptor, but CXF does not.