Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBD4610742 for ; Wed, 19 Mar 2014 07:52:47 +0000 (UTC) Received: (qmail 32757 invoked by uid 500); 19 Mar 2014 07:52:47 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 32714 invoked by uid 500); 19 Mar 2014 07:52:45 -0000 Mailing-List: contact commits-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 commits@struts.apache.org Received: (qmail 30439 invoked by uid 99); 19 Mar 2014 07:52:27 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 07:52:27 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 31133983EC7; Wed, 19 Mar 2014 07:52:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Date: Wed, 19 Mar 2014 07:52:37 -0000 Message-Id: <46e737a0e9a4493e9d1709a43421a60c@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [12/14] git commit: https://issues.apache.org/jira/browse/WW-4299 - do not assign value to id parameter if tryId value is null this prevents overwriting a parameter with a name of id used with the component tag https://issues.apache.org/jira/browse/WW-4299 - do not assign value to id parameter if tryId value is null this prevents overwriting a parameter with a name of id used with the component tag Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/cb9f0f56 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/cb9f0f56 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/cb9f0f56 Branch: refs/heads/feature/WW-4187-correctly-identify-protocols Commit: cb9f0f5645d05b2f1c7c66640716acff61c4425f Parents: 3ceb3b9 Author: phillips1021 Authored: Tue Mar 18 09:46:36 2014 -0500 Committer: phillips1021 Committed: Tue Mar 18 09:46:36 2014 -0500 ---------------------------------------------------------------------- .../src/main/java/org/apache/struts2/components/UIBean.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/cb9f0f56/core/src/main/java/org/apache/struts2/components/UIBean.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java index 9418a6e..51b7e79 100644 --- a/core/src/main/java/org/apache/struts2/components/UIBean.java +++ b/core/src/main/java/org/apache/struts2/components/UIBean.java @@ -1024,8 +1024,13 @@ public abstract class UIBean extends Component { } else { tryId = generatedId; } - addParameter("id", tryId); - addParameter("escapedId", escape(tryId)); + + //fix for https://issues.apache.org/jira/browse/WW-4299 + //do not assign value to id if tryId is null + if (tryId != null) { + addParameter("id", tryId); + addParameter("escapedId", escape(tryId)); + } } /**