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.