Hi Tom
Rather than modify FormEncodingReaderProvider I made my own provider
that handles classes that implement MultivalueMap.
On the plus side
there is no need to modify FormEncodingReaderProvider and I can use
this provider in other jaxrs implementations.
On the negative side I had to duplicate some of the code in
FormEncodingReaderProvider
(which I just copied from it. thank you vary much!). I have included
my new provider. You are welcome to use it any way you wish, but be
warned that I have not tested it yet.
The provider has not been included with this email, but I'd be interested in
looking at the code
you did to handle cases where specific MultivaluedMap implementations are listed in signatures and possibly applying it to
FormEncodingReaderProvider. So if you could post it then it would be helpful
Out of curiosity - why having a default provider impl (say be it a CXF JAXRS one or a Jersey one) is not always sufficient for your
case ? Do you have some optimized MultivaluedMap impls ?
Or some additional helper methods ? In this case it might make sense to update
FormEncodingReaderProvider
Thanks, Sergey
On Wed, Nov 19, 2008 at 10:40 AM, Tom McGee <[EMAIL PROTECTED]> wrote:
You may want to wait on that patch. I'm playing with it and have
already found a problem. If you have a class in your signature that
implements MultivaluedMap you get an exception thrown. If you want
only the option of using MultivaluedMap in the signature then leave
FormEncodingReaderProvider unchange. If you want to allow a class that
implements MultivaluedMap in the method signature then stay tuned ...
I'm working on it.
On Wed, Nov 19, 2008 at 9:47 AM, Sergey Beryozkin
<[EMAIL PROTECTED]> wrote:
Yea, agreed - but if are you using MultivaluedMap in your signature then it
should work fine.
BradO - if you're reading it - it's a perfect time for a patch :-), unless
Tom does it first :-)
Thanks, Sergey
----- Original Message ----- From: "Tom McGee" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 19, 2008 5:37 PM
Subject: problem in FormEncodingReaderProvider or in my java knowledge
Line 47 of org.apache.cxf.jaxrs.provider. FormEncodingReaderProvider
reads:
return type.isAssignableFrom(MultivaluedMap.class);
I think maybe it should be:
return MultivaluedMap.class.isAssignableFrom(type);
Or maybe I'm just showing my ignorance :-).