The spec is very specific in some aspects of the various maps available
(session/request/parameter/cookie/... map) but leaves some stuff open to
the reader. Behaviour of the clear() method is one of the open points so
I changed the MyFaces implementation to follow the RI in throwing
UnsupportedOperationException. This was necessary to pass the TCK.

Besides: if you have a look at the javadoc of the Map interface you will
recognize that clear() is an optional operation. So if you get an object
of type Map there is no guarantee the clear() method will work. It
depends on the respective implementation.

Oliver


Martin Marinschek wrote:

>This was added by Oliver Rossmueller - who is on holidays right now ;)
>
>I suppose it was for passing the TCK also, as it was a fairly recent
>change. Do you have the RI available and can check what they are doing
>with this method?
>
>regards,
>
>Martin
>
>On 9/19/05, Kevin Roast <[EMAIL PROTECTED]> wrote:
>  
>
>> 
>>
>>Hi, 
>>
>>Can I ask why
>>org.apache.myfaces.context.servlet.SessionMap.clear() now
>>throws UnsupportedOperationException? 
>>
>>Thanks, 
>>
>>Kevin 
>>-- 
>>http://www.alfresco.org 
>> 
>>    
>>
>
>
>  
>


-- 
Oliver Rossmueller
Software Engineer and IT-Consultant
Hamburg, Germany
http://www.rossmueller.com

Reply via email to