[
https://issues.apache.org/jira/browse/WINK-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730051#action_12730051
]
Michael Elman commented on WINK-47:
-----------------------------------
I've asked the question about this issue at the
[us...@jsr311|https://jsr311.dev.java.net/servlets/BrowseList?listName=users&by=thread&from=1876125&to=1876125&first=1&count=8]
mailing list, and it seems that isCompatible() should be used, when calling
from the javax.ws.rs.ext.Providers context.
About the possible implementation: I think the implementation should be split
into two:
# The search for a concrete type
# The search for a type containing wildcard.
The first implementation is called from the Wink's runtime (see Issue 2 in my
previous comment), and it's more efficient.
The second implementation may be invoked only by the user and it will run over
all providers using isCompatible method, so it would be less efficient then the
first one, but... the user can only blame himself.
> 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.