cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject Re: JAX-RS Form Encoding Provider
Date Thu, 28 Feb 2008 11:00:42 GMT
Hi Barry

This is great. Perhaps you may still want to support Map<String, String> as well, I
was wrong suggesting it would spec uncompliant, the spec requires MultivaluedMap<String,
String>, but as long as there's a provider to support Map<String, String>, then it
would be fine...

The only possible problem with Map<String, String>, is that, as far as I rememeber,
one may have mutiple values for a given key in a form request :

input=bar&input=foo, thus a String value will make it more difficult to handle such cases.

MultivaluedMap<String, String> is really a Map<String, List<String>>. It
has methods like getSingle, so if you know that in your own application no multiple values
are possible, then you can use getSingle() to avoid dealing with Lists.
>From the provider's perspective, perhaps add(key, value) should be used, as it will append
values to the list if it already exists

Thanks, Sergey

> Thanks Sergey,
> I've created a sub task for this:
> I'll tidy up my code, change it to use MultivaluedMap and create a patch.
> Barry

IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

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