[
https://issues.apache.org/jira/browse/WINK-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729051#action_12729051
]
Michael Elman commented on WINK-47:
-----------------------------------
I have a feeling that we are messing two issues into the same thread:
*Issue 1*: Looking for a provider in the ProvidersRegistry using
javax.ws.rs.ext.Providers context.
*Issue 2*: Selecting the right method and then the correct media type for the
response, based on client's Accept header.
Please, pay attention that these are different issues and they are defined in
two different places in spec:
* Issue 1 in javadocs of javax.ws.rs.ext.Providers
* Issue 2 the spec at 3.7.2.3 (b) and 3.8
In the previous comments I was always talking about the Issue 1 only and I
thought that this what WINK-47 is talking about.
But I think that Nick's latest comment mainly refers to Issue 2 and not to
Issue 1.
*Talking about Issue 2:* {{isCompatible()}} is used for selecting the correct
resource method. After the correct method was selected and invoked the
algorithm from 3.8 is applied. The result of the algorithm is *a concrete type*
or an exception. This concrete type is used to search for a Provider in the
ProvidersRegistry (described in spec 4.2.2 and 4.2.3). It's important to pay
attention that a *a concrete type* is used at this point, so equals() should
behave well enough.
> honor media type wildcards
> --------------------------
>
> Key: WINK-47
> URL: https://issues.apache.org/jira/browse/WINK-47
> Project: Wink
> Issue Type: Bug
> Components: Common
> Affects Versions: 0.1
> Reporter: Mike Rheinheimer
> Fix For: 0.1
>
> Attachments: patch.txt, patch_02.txt
>
>
> This issue probably needs discussion, as it may be a spec interpretation
> issue. Please reference JAX-RS javadoc for
> javax.ws.rs.ext.Providers.getContextResolver here:
> http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/ext/Providers.html#getContextResolver(java.lang.Class,%20javax.ws.rs.core.MediaType)
> Currently, the implementation does not use the '*' character in a passed-in
> media type as a wildcard. Rather, it matches exactly by just allowing the
> LinkedHashMap.get to it's object compare. Attached is a patch with tests
> that demonstrate the proposed function, and a fix that supports it. All
> existing and new tests in wink-common and wink-server passed for me with this
> change.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.