jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Re: Remove unused ParamConverter.toString() ?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 11 Jan 2013 15:33:22 +0000

On 10/01/13 12:11, Marek Potociar wrote:
> Can you explain how?
>
> What we initially wanted to do in Jersey was to use it in some client-side methods:
> - WebTarget.queryParam, matrixParam, resolveTemplate ...
> - Invocation.Builder.header, headers
>
> But then IIRC we found it confusing because same methods as on WebTarget when used on UriBuilder would not be able to produce same results. So we decided to not use it at all. This difference in behavior between WebTarget and UriBuilder methods is something that I still find rather confusing, which is why I tend to lean towards removing the method from the API. (Just expressing my current position, let's keep on discussing.)
>
> I'd like to hear from other experts in the group too.
>
CXF does not implement the client API yet but we use ParameterConverter
with CXF specific API.

To be honest I'd not be too concerned about the fact UriBuilder would
produce different representations, I'm assuming this is because
UtiBuilder implementation is calling "object.toString()" ?

If the user wants MyObject be reasonably represented say as query
parameter value, why don't user override MyObject.toString() ?

I guess it is only the instances of some Java built-in classes where
toString() is not overidden which are difficult to control properly, right ?

Sergey

> Marek
>
> On Jan 9, 2013, at 6:59 PM, Bill Burke<bburke_at_redhat.com> wrote:
>
>> I use it client-side.
>>
>> On 1/9/2013 11:43 AM, Marek Potociar wrote:
>>> Hello experts,
>>>
>>> According to one issue that has been filed, it seems that in the current
>>> API there is no way how ParamConverter.toString() could be used, is
>>> there? If there is not, I'd suggest we remove the method from the API.
>>>
>>> Please see also the original issue:
>>> http://java.net/jira/browse/JAX_RS_SPEC-314
>>>
>>> Looking forward to your comments,
>>> Marek
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>