cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: 3.1.0 regression from 3.0.4
Date Wed, 06 May 2015 15:15:48 GMT
how
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java;h=31721b0cea8be76318ce350ab047ff034aba1808;hb=c7db05bc509942f266c494c692d8331f8fdf8ada
could accept */*?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-05-06 17:07 GMT+02:00 Sergey Beryozkin <sberyozkin@gmail.com>:

> I think it is fine now, have a look at the source please...
>
> Thanks, Sergey
> On 06/05/15 16:00, Romain Manni-Bucau wrote:
>
>> Hmm, doesn't
>> org.apache.cxf.jaxrs.provider.PrimitiveTextProvider#isReadable/
>> isWriteable ignore parent configuration?
>>
>>
>> Romain Manni-Bucau
>>
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> <http://www.tomitribe.com>
>>
>> 2015-05-06 16:56 GMT+02:00 Sergey Beryozkin <sberyozkin@gmail.com>:
>>
>>  Hi,
>>> On 06/05/15 10:19, Romain Manni-Bucau wrote:
>>>
>>>  2015-05-06 11:13 GMT+02:00 Sergey Beryozkin <sberyozkin@gmail.com>:
>>>>
>>>>   Sure, having it configurable would be one option, will take care of
>>>> it.
>>>>
>>>>> Another option is to register a custom provider.
>>>>>
>>>>>
>>>>>  yes this is more or less the same since you redefine the priitive
>>>> provider
>>>> but would be sad to have to impl this one yourself as a user ;)
>>>>
>>>>  I've just realized this provider is already configurable indirectly, it
>>> has consumeMediaTypes and produceMediaTypes properties, setting both to
>>> */*
>>> will do it.
>>>
>>> FYI, I've just updated PrimitiveTextProvider to support Boolean/boolean,
>>> etc only but not String. I had to do it in order to annotate
>>> PrimitiveTextProvider with text/plain (to start getting CXF-6307
>>> addressed), but String has to be supported for */* by default.
>>>
>>> Thanks, Sergey
>>>
>>>
>>>
>>>>   Thanks, Sergey
>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 06/05/15 09:59, Romain Manni-Bucau wrote:
>>>>>
>>>>>   I see,
>>>>>
>>>>>>
>>>>>> maybe something doesn't hurting much CXF would be to add a flag in
the
>>>>>> primitive provider. This way users could at least configure it to
go
>>>>>> back
>>>>>> to the previous behavior.
>>>>>>
>>>>>>
>>>>>> Romain Manni-Bucau
>>>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>>>> <http://rmannibucau.wordpress.com> | Github <
>>>>>> https://github.com/rmannibucau> |
>>>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>>>>> <http://www.tomitribe.com>
>>>>>>
>>>>>> 2015-05-06 10:54 GMT+02:00 Sergey Beryozkin <sberyozkin@gmail.com>:
>>>>>>
>>>>>>    Hi Romain
>>>>>>
>>>>>>
>>>>>>> Looks like you have a very nice set of tests which is impressive
:-)
>>>>>>>
>>>>>>> That was a 'side-effect' of getting a spec requirement enforced.
It
>>>>>>> is
>>>>>>> about  section 4.2.6,
>>>>>>> "java.lang.Boolean , java.lang.Character , java.lang.Number Only
for
>>>>>>> text/plain"
>>>>>>>
>>>>>>> Personally I think it is too restrictive but a TCK test is failing
>>>>>>> against
>>>>>>> CXF right now, which is partially related to this requirement,
hence
>>>>>>> this
>>>>>>> restriction needs to be enforced first for the final test solution
to
>>>>>>> be
>>>>>>> done.
>>>>>>> Now that it is done it would be sensitive still continue to support
>>>>>>> Boolean/etc for any media type by default - we've had some troubles
>>>>>>> with
>>>>>>> the matching algorithm offering a more flexible sub-resource
>>>>>>> selection
>>>>>>> in
>>>>>>> some of the edge cases by default earlier...
>>>>>>>
>>>>>>> Thanks, Sergey
>>>>>>>
>>>>>>>
>>>>>>> On 06/05/15 09:23, Romain Manni-Bucau wrote:
>>>>>>>
>>>>>>>    Hi guys,
>>>>>>>
>>>>>>>
>>>>>>>> org.apache.cxf.jaxrs.provider.PrimitiveTextProvider#isSupported
>>>>>>>> changed
>>>>>>>> when upgrading to also validate the media type.
>>>>>>>>
>>>>>>>> This sounds better but it is actually a regression since
before it
>>>>>>>> was
>>>>>>>> supported with any media type.
>>>>>>>>
>>>>>>>> A solution could be to have it twice in the writer chain,
once with
>>>>>>>> this
>>>>>>>> restriction at the beginning and another time without this
>>>>>>>> restriction
>>>>>>>> at
>>>>>>>> the end as a fallback.
>>>>>>>>
>>>>>>>> Not sure it does worth a fix but was a small side effect
I
>>>>>>>> experienced
>>>>>>>> upgrading.
>>>>>>>>
>>>>>>>> Romain Manni-Bucau
>>>>>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>>>>>> <http://rmannibucau.wordpress.com> | Github <
>>>>>>>> https://github.com/rmannibucau> |
>>>>>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau>
| Tomitriber
>>>>>>>> <http://www.tomitribe.com>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message