Removing things from Context
Nathan Kontny <Nathan.Kontny-UgwZ4owrJFB8UrSeD/[email protected]>
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
I believe I am seeing a bug in Avalons DefaultContext. When you try and remove
something from context by doing a context.put(key, null), the context class is
doing:
public void put( final Object key, final Object value )
throws IllegalStateException
{
checkWriteable();
if( null == value )
{
m_contextData.remove( key );
}
else
{
m_contextData.put( key, value );
}
}
However a context can have a parent context I guess, and its not going in there
to remove the value as it might be located there. So I am seeing things not
get removed from session when I tell it to.
Has anyone got a workaround for this, or know if there is an updated avalon with
this fix?
Thank you,
Nathan