[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-3154) Better if Context.remove() actually returns what was removed.

Tobias Hill (JIRA) jira-events at lists.jboss.org
Fri Jul 11 05:15:28 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-3154?page=all ]

Tobias Hill updated JBSEAM-3154:
--------------------------------

    Description: 
In short: it is quite common to let a remove-method on map-like structures 
return the removed object. I can't see any reason why Context.remove() has 
to return void. 

It would let me write: 
Object bar = getSessionContext().remove("foo");

Instead of:
Object bar = getSessionContext().get("foo");
getSessionContext().remove("foo");

Moreover: This micro-enhancement to the api would make it easier to "remove and show" an object from an EL-expression as well. 

  was:
In short: it is quite common to let a remove-method on map-like structures 
return the removed object. I can't see any reason why Context.remove() has 
to return void. 

It would let me write: 
Object bar = getSessionContext().remove("foo");

Instead of:
Object bar = getSessionContext().get("foo");
getSessionContext().remove("foo");




> Better if Context.remove() actually returns what was removed. 
> --------------------------------------------------------------
>
>                 Key: JBSEAM-3154
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-3154
>             Project: Seam
>          Issue Type: Feature Request
>          Components: Core
>    Affects Versions: 2.0.2.SP1
>            Reporter: Tobias Hill
>
> In short: it is quite common to let a remove-method on map-like structures 
> return the removed object. I can't see any reason why Context.remove() has 
> to return void. 
> It would let me write: 
> Object bar = getSessionContext().remove("foo");
> Instead of:
> Object bar = getSessionContext().get("foo");
> getSessionContext().remove("foo");
> Moreover: This micro-enhancement to the api would make it easier to "remove and show" an object from an EL-expression as well. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list