[ 
https://issues.apache.org/jira/browse/CXF-6429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14568985#comment-14568985
 ] 

Sergey Beryozkin commented on CXF-6429:
---------------------------------------

I think the spec leads are correct. Only the top level generic type of MBR (or 
MBW) is considered. 
I think this issue is similar to CXF-6307 where effectively the pre-packaged 
and custom providers get mixed in and the 'custom' status only starts making a 
difference if all other conditions are checked and produce equal candidates... 
I'll address both issues with a single fix.

> Provider matching when nested generic type
> ------------------------------------------
>
>                 Key: CXF-6429
>                 URL: https://issues.apache.org/jira/browse/CXF-6429
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.0.3
>         Environment: Windows
>            Reporter: Neal Hu
>             Fix For: 3.0.6
>
>
> This is TCK case:
> resource class: 
> JAXBElement<String> method(JAXBElement<String> jaxb){
> }
> Provider 1(applicaiton provided provider): 
> public class Provider1  implements MessageBodyReader<JAXBElement<String>>, 
> MessageBodyWriter<JAXBElement<String>>
> Provider 2: JAXBElementProvider
> @Comsumes("...")
> @Produces("...")
> public class Provider2  implements MessageBodyReader<T>, MessageBodyWriter<T>
> The case intends to match the pre-packaged provider, we challenged the case 
> but spec leads rejected the challenge. They mentioned the inside generic type 
> <String> should be ignored, and compare the JAXBElement then compare media 
> type(provider2 has concrete media type). But we think according to spec 
> 4.2.2|#4 provider1 is the nearest class of the resource java type. What's 
> your thinking, please share with us.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to