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

JAXRS CTS/TCK issue: register(...) should ignore components when invalid contracts are passed in

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.3, 3.2.4
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      We're seeing some failures when running the JAX-RS 2.1 TCK - particularly around the register method. The javadoc states that the implementation MUST ignore the component if the call to register specifies a contract (interface) that the component does not implement.

      So, for example, suppose somebody calls code like this:

       

      public class MyProvider implements MessageBodyWriter<MyObject> ...

       

      Client c = ClientBuilder.newClient();

      c.register(MyProvider.class, ContainerRequestFilter.class); // should ignore

      c.register(new MyProvider, ExceptionMapper.class, MessageBodyReader.class); // should ignore

      Map<Class, int> contractPriorityMap = new HashMap<>();

      contractPriorityMap.put(ClientResponseFilter.class, 20);

      c.register(MyProvider.class, contractPriorityMap); // should ignore

      c.register(new MyProvider.class, contractPriorityMap); // should ignore

       

      The TCK tests basically check that nothing gets registered when a passed-in contract is not assignable to the provider class.  And scenarios like the four mentioned above are failing.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                andymc Andy McCright
                Reporter:
                andymc Andy McCright
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: