From issues-return-14533-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Wed Feb 17 20:44:52 2010 Return-Path: Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: (qmail 5360 invoked from network); 17 Feb 2010 20:44:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2010 20:44:51 -0000 Received: (qmail 65980 invoked by uid 500); 17 Feb 2010 20:44:51 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 65910 invoked by uid 500); 17 Feb 2010 20:44:51 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 65902 invoked by uid 99); 17 Feb 2010 20:44:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 20:44:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 20:44:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F02D8234C495 for ; Wed, 17 Feb 2010 12:44:27 -0800 (PST) Message-ID: <1692453490.343081266439467982.JavaMail.jira@brutus.apache.org> Date: Wed, 17 Feb 2010 20:44:27 +0000 (UTC) From: "Erling Molde (JIRA)" To: issues@struts.apache.org Subject: [jira] Commented: (WW-3385) (Application|Session|Request)Map.put(key,value) breaks Map-contract, returning new value, not old value In-Reply-To: <1536719542.335911266422607903.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/WW-3385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834981#action_12834981 ] Erling Molde commented on WW-3385: ---------------------------------- Ooops! Blunder! Yes, you're quite right. That's what I meant. > (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 > Assignee: Lukasz Lenart > 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.