Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1696

@PreMatching prevents usage of ClientRequestFilter

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.18.Final
    • Fix Version/s: 4.0.0.Beta1
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Create a javax.ws.rs.client.ClientRequestFilter annotated with javax.ws.rs.container.@PreMatching and register via javax.ws.rs.client.ClientBuilder#register(Object).

      Show
      Create a javax.ws.rs.client.ClientRequestFilter annotated with javax.ws.rs.container.@PreMatching and register via javax.ws.rs.client.ClientBuilder#register(Object) .

      Description

      It appears that if @PreMatching is applied to a ClientReqeuestFilter is prevents it from being used. This is due to the generic way org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry#postMatch [line:127] performs matching.

      According to the JavaDoc:

      Global binding annotation that can be applied to a ContainerRequestFilter container request filter to indicate that such filter...

      Therefore this annotation should only apply to the ContainerRequestFilter and not ClientRequestFilter.

      The reason this issue occurred is due to attempting to implement both Client and Container filters in on class due to common usage.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rsearls R Searls
                Reporter:
                dansiviter Dan Siviter
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: