[ 
https://issues.apache.org/jira/browse/WINK-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728096#action_12728096
 ] 

Mike Rheinheimer commented on WINK-47:
--------------------------------------

Good points Michael and Nick.

The good news is that this new GreedyLinkedHashMap is a small private nested 
class inside another small private nested class, so the changes are containable.

I'll be glad to expand the rest of the GreedyLinkedHashMap to provide the 
proper LinkedHashMap overrides and expand the unittest to cover it.  It sounds 
like I hit on the right solution, but that it was just incomplete.  That sound 
right?

Perhaps another solution is to not override the 'get', but instead just provide 
another method like 'getByRegex' or 'getCompatible'.  That way the intent is 
clear and we don't have to worry about overriding all the other LinkedHashMap 
methods.  Given the narrow scope of these classes, I might be leaning this way. 
 Your thoughts?

> 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
>
>
> 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.

Reply via email to