struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erling Molde (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3385) (Application|Session|Request)Map.put(key,value) breaks Map-contract, returning new value, not old value
Date Wed, 17 Feb 2010 16:03:27 GMT
(Application|Session|Request)Map.put(key,value) breaks Map-contract, returning new value, not
old value
-------------------------------------------------------------------------------------------------------

                 Key: WW-3385
                 URL: https://issues.apache.org/jira/browse/WW-3385
             Project: Struts 2
          Issue Type: Improvement
          Components: Dispatch Filter
    Affects Versions: 2.1.8.1
            Reporter: Erling Molde
            Priority: Trivial


Noticed that the Map-wrapper classes (org.apache.struts2.dispatcher.RequestMap etc.) returns
the new value from put-method.

request.setAttribute(key.toString(), value);
return get(key);

Should be:

V value = get(key);
request.setAttribute(key.toString(), value);
return value;

in order to be consistent with other Map-implementations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message