You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Janmyr Anders <an...@btj.se> on 2000/02/01 14:42:19 UTC
Bug in pageContextImpl
Hello,
I have found a bug in PageContextImpl.java
In removeAttribute, row 242 the line reads
session.setAttribute(name, null)
it should probably be
session.removeAttribute(name).
Since the underlying implementation of session uses Hashtable which cannot
contain nulls.
There is also a comment there from the previous implementation:
// was:
// session.removeValue(name);
// REVISIT Verify this is correct - akv
The deprecation was from removeValue -> removeAttribute.
regards
Anders
Re: Bug in pageContextImpl
Posted by Tim Fox <ti...@hyperlink.com>.
Yeah I found this too.
Work-around is to explicitly remove the attribute from the session in your own
code (rather obvious I know).
Anyone know if this is fixed in 3.1?
Janmyr Anders wrote:
> Hello,
>
> I have found a bug in PageContextImpl.java
> In removeAttribute, row 242 the line reads
> session.setAttribute(name, null)
>
> it should probably be
> session.removeAttribute(name).
>
> Since the underlying implementation of session uses Hashtable which cannot
> contain nulls.
>
> There is also a comment there from the previous implementation:
> // was:
> // session.removeValue(name);
> // REVISIT Verify this is correct - akv
>
> The deprecation was from removeValue -> removeAttribute.
>
> regards
>
> Anders
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
--
Tim Fox (¦¬o)
Hyperlink plc
http://hyperlink.com
email: timf@hyperlink.com
phone: +44 (0) 207 240 8121