Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6429

Provider matching when nested generic type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.3
    • 3.0.6, 3.1.2
    • JAX-RS
    • None
    • Windows

    • Unknown

    Description

      This is TCK case:
      resource class:
      JAXBElement<String> method(JAXBElement<String> jaxb){

      }
      Provider 1(applicaiton provided provider):
      public class Provider1  implements MessageBodyReader<JAXBElement<String>>, MessageBodyWriter<JAXBElement<String>>
      Provider 2: JAXBElementProvider
      @Comsumes("...")
      @Produces("...")
      public class Provider2  implements MessageBodyReader<T>, MessageBodyWriter<T>

      The case intends to match the pre-packaged provider, we challenged the case but spec leads rejected the challenge. They mentioned the inside generic type <String> should be ignored, and compare the JAXBElement then compare media type(provider2 has concrete media type). But we think according to spec 4.2.2|#4 provider1 is the nearest class of the resource java type. What's your thinking, please share with us.

      Attachments

        Issue Links

          Activity

            People

              sergey_beryozkin Sergey Beryozkin
              nbqyqx@163.com Neal Hu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: