Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2343 by alexander.kozlov.IV: SipServletMessage.getHeaders(String name) returns un-modifiable ListIterator
http://code.google.com/p/mobicents/issues/detail?id=2343

In javadoc for this method I see following:

Returns all the values of the specified request header as a ListIterator over a number of String objects. The values returned by the Iterator follow the order in which they appear in the message header. Either the long or compact name can be used to access the header field, as both are treated as equivalent. The list of assigned compact form is available in the IANA registry at http://www.isi.edu/in-notes/iana/assignments/sip-parameters Some headers, such as Accept-Language can be sent by clients as several headers each with a different value rather than sending the header as a comma separated list. If the request did not include any headers of the specified name, this method returns an empty Iterator. The header name is case insensitive. Note: This is a fail-fast iterator and can throw ConcurrentModificationException if the underlying implementation does not allow modification after the iterator is created. Attempts to modify the specified header field through the returned list iterator must fail with an IllegalStateException if the header field is a system header.

And the last sentence says that "iterator must fail" when it's system header, but for non-system headers it's not working also because method copy values to ArrayList and never reflects modification back to message.

Reply via email to