Re: Removing things from Context
Nathan Kontny <Nathan.Kontny-UgwZ4owrJFB8UrSeD/[email protected]>
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
Mike, I notice that you authored Avalon's OverridableContext which sort of solves this problem. However I can't cast down to it. My solution at the moment is to do what you do in this class, basically when I want to "remove" something from context i just do a hide on it..... -Nate Quoting "Michael Nash JGlobal.com" <[email protected]>: > Nathan: > > I wasn't aware of the bug, but I'll try to work up a unit test for this right > away, and I'll bring it to the attention of the Avalon group as well. I > thought I had some code that did something similar... I'll also dig for > that. > > Thanks! > > Mike > > On Mon, 26 Apr 2004 19:59:37 -0700 > Nathan Kontny <Nathan.Kontny-UgwZ4owrJFB8UrSeD/[email protected]> wrote: > > > 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 > > _______________________________________________ > > User mailing list > > [email protected] > > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org > > > -- > Michael Nash > > JGlobal Ltd > Next-Generation Web Application Development and Open Source Support > http://www.jglobal.com > > Bahamas Commerce and Trade > Offshore eCommerce Hosting and Business Services > http://www.bahamascommerce.com > > _______________________________________________ > User mailing list > [email protected] > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org >