Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 973071780A for ; Wed, 6 May 2015 15:23:33 +0000 (UTC) Received: (qmail 93751 invoked by uid 500); 6 May 2015 15:23:33 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 93689 invoked by uid 500); 6 May 2015 15:23:33 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 93673 invoked by uid 99); 6 May 2015 15:23:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 15:23:33 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for dev@cxf.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 15:23:28 +0000 Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 76302249FD for ; Wed, 6 May 2015 15:23:08 +0000 (UTC) Received: by qcyk17 with SMTP id k17so6342333qcy.1 for ; Wed, 06 May 2015 08:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=yc83cmaztZoa+iS2t2M8s79Z3iZ9rpH/naQ3M7DDATc=; b=lIjuCSFLllGdYmLciwI9HOBeaAyXwEojni3zCc0z24UCVpoZ2UKlYXvgBygWybxKiT A2OPiv7tdZiut3aZMUGwXmy266I9bvVVCn9FXl+RDvMwqhilcNcEJX4eIlcSghOmR7rq aRLHI1LmV+llBA086eKsHjvdvjdlbfpwADJTNGvp0E8P1szh7JBVb6uBmqukUkY+sCL2 8skjLK1lPoa81YGwsJKkbv+TsVlsHN8kQpUSi6vsI6wIbuYXWNjr7Op54NJ7GgB1RzUh UuN82mShFtrjRqeKy1eBa9bpy0WTUXmDNYB5GdR8duAoDs0bbAahM5IUVCq8cn2I1X9H ogzA== X-Received: by 10.140.151.212 with SMTP id 203mr44316416qhx.8.1430925787755; Wed, 06 May 2015 08:23:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.129.131 with HTTP; Wed, 6 May 2015 08:22:47 -0700 (PDT) In-Reply-To: <554A3130.40202@gmail.com> References: <5549D6B8.7090109@gmail.com> <5549DB2A.3010807@gmail.com> <554A2BA1.8020508@gmail.com> <554A2E35.2060707@gmail.com> <554A3130.40202@gmail.com> From: Romain Manni-Bucau Date: Wed, 6 May 2015 17:22:47 +0200 Message-ID: Subject: Re: 3.1.0 regression from 3.0.4 To: "dev@cxf.apache.org" Content-Type: multipart/alternative; boundary=001a113763824780fa05156b5f4d X-Virus-Checked: Checked by ClamAV on apache.org --001a113763824780fa05156b5f4d Content-Type: text/plain; charset=UTF-8 ok I see, thks! Romain Manni-Bucau @rmannibucau | Blog | Github | LinkedIn | Tomitriber 2015-05-06 17:20 GMT+02:00 Sergey Beryozkin : > If you set the custom property I've referred to then the runtime will > prefer that to a static Consumes/Produces. It is a CXF specific feature > > Sergey > On 06/05/15 16:15, Romain Manni-Bucau wrote: > >> 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 | Blog >> | Github < >> https://github.com/rmannibucau> | >> LinkedIn | Tomitriber >> >> >> 2015-05-06 17:07 GMT+02:00 Sergey Beryozkin : >> >> 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 | Blog >>>> | Github < >>>> https://github.com/rmannibucau> | >>>> LinkedIn | Tomitriber >>>> >>>> >>>> 2015-05-06 16:56 GMT+02:00 Sergey Beryozkin : >>>> >>>> Hi, >>>> >>>>> On 06/05/15 10:19, Romain Manni-Bucau wrote: >>>>> >>>>> 2015-05-06 11:13 GMT+02:00 Sergey Beryozkin : >>>>> >>>>>> >>>>>> 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 | Blog >>>>>>>> | Github < >>>>>>>> https://github.com/rmannibucau> | >>>>>>>> LinkedIn | Tomitriber >>>>>>>> >>>>>>>> >>>>>>>> 2015-05-06 10:54 GMT+02:00 Sergey Beryozkin : >>>>>>>> >>>>>>>> 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 | Blog >>>>>>>>>> | Github < >>>>>>>>>> https://github.com/rmannibucau> | >>>>>>>>>> LinkedIn | Tomitriber >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --001a113763824780fa05156b5f4d--