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

@PreMatching prevents usage of ClientRequestFilter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Beta1, 3.5.0.CR1
    • 3.0.18.Final
    • None
    • None
    • 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.

      Attachments

        Activity

          People

            rsearls r searls
            dansiviter Daniel Siviter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: