users@jersey.java.net

Re: [Jersey] ClassCastException in jersey-multipart

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 27 Nov 2008 12:47:31 +0100

On Nov 26, 2008, at 11:36 PM, Gili wrote:

>
> Paul,
>
> Can you please commit this to trunk?
>

Done.

I also took the opportunity to refactor the MIME multipart header
support to reuse utility classes from jersey-core rather than
duplicating code.

Paul.

> Gili
>
>
> Gili wrote:
>>
>> Here is my patch:
>>
>> http://n2.nabble.com/file/n1567282/gili1.patch gili1.patch
>>
>> You will probably want to add a Collections-like helper class in
>> front of
>> ImmutableMultivaluedMap. Also, Craig I think you should consider
>> adding
>> mutable ParameterizedHeaders in the future. It would be useful for
>> building headers on the client end instead of having to format things
>> correctly (granted this is less vital than on the server end).
>>
>> Gili
>>
>>
>> Gili wrote:
>>>
>>> java.util.Collections$UnmodifiableMap cannot be cast to
>>> javax.ws.rs.core.MultivaluedMap
>>> at
>>> com
>>> .sun
>>> .jersey.multipart.BodyPart.getParameterizedHeaders(BodyPart.java:
>>> 148)
>>>
>>> It looks like you're going to have to define an immutable
>>> MultivaluedMap.
>>>
>>> Gili
>>>
>>
>>
>
> --
> View this message in context: http://n2.nabble.com/ClassCastException-in-jersey-multipart-tp1567132p1583117.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>