users@jersey.java.net

Re: [Jersey] ClassCastException in jersey-multipart

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Fri, 28 Nov 2008 09:47:31 -0800 (PST)

Paul,

  I just realized the class name I chose was rather poor. Can you please
rename ImmutableMultivaluedMap to UnmodifiableMultivaluedMap? We might need
a real immutable map in the future. We don't want to confuse this with an
unmodifiable view of a potentially changing map.

Thanks,
Gili


Paul Sandoz wrote:
>
>
> 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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>

-- 
View this message in context: http://n2.nabble.com/ClassCastException-in-jersey-multipart-tp1567132p1590013.html
Sent from the Jersey mailing list archive at Nabble.com.