tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Delisle <pierre.deli...@sun.com>
Subject PageContext.removeAttribute
Date Mon, 20 Nov 2000 18:42:13 GMT

> Bug report #412 has just been filed.

> Synopsis:
> public void removeAttribute(String name) does not work properly
> 
> Description:
> lt. spec from sun this method is required to remove
> the attribute from every scope.  in class PageContextImpl
> however this only removes attributes from the page context:
> 
> public void removeAttribute(String name) {
>   attributes.remove(name);
> }
> 

This is indeed a bug, and I can go ahead and fix it
(at least in 3.3/4.0).
However, before I do so, would someone know why we
have the following comments/code in PageContextImpl?

In the class comments:
 * The removeAttribute method does not work for request scope. Needs fixing.


public void removeAttribute(String name, int scope) {
    switch (scope) {
    ...
    case REQUEST_SCOPE:
        throw new IllegalArgumentException("cant remove Attributes from request scope");
    ...


  -- Pierre

Mime
View raw message