Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-71

getContextResolver search algorithm does not expand for text/*

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.1
    • 0.1
    • Common
    • None
    • Patch Available

    Description

      I'm hoping this patch gets overwritten by WINK-47, but they are not related. There is a definite existing bug in that when we have a provider:

      @Provider
      @Produces( "text/plain", "/" )
      public static class StringContextResolver implements ContextResolver<String> {
      ...

      And search by:

      ProvidersRegistry.getContextResolver(String.class, new MediaType("text", "*"), null)

      We'll get null back. The algorithm in ProvidersRegistry.MediaTypeMap.getProvidersByMediaType(MediaType, Class<?>) needs fixed. Please see patch for test that demonstrates the problem, and the fix.

      This Jira can be closed if WINK-47 is integrated prior to integrating the attached patch.

      Attachments

        1. patch.txt
          2 kB
          Michael Rheinheimer

        Activity

          People

            Unassigned Unassigned
            rott Michael Rheinheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: