Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7AC69200BB8 for ; Sat, 12 Nov 2016 17:40:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 79872160B14; Sat, 12 Nov 2016 16:40:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB107160AF5 for ; Sat, 12 Nov 2016 17:40:21 +0100 (CET) Received: (qmail 27234 invoked by uid 500); 12 Nov 2016 16:40:21 -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 27224 invoked by uid 99); 12 Nov 2016 16:40:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Nov 2016 16:40:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A6857E0362; Sat, 12 Nov 2016 16:40:20 +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: Sat, 12 Nov 2016 16:40:20 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] struts git commit: WW-4701 Drop parameter if not defined archived-at: Sat, 12 Nov 2016 16:40:22 -0000 Repository: struts Updated Branches: refs/heads/master a5092a24f -> e1e2ea84a WW-4701 Drop parameter if not defined Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/986b43f3 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/986b43f3 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/986b43f3 Branch: refs/heads/master Commit: 986b43f3147c73611fdb3956fdbd4fe01a06e550 Parents: a5092a2 Author: Lukasz Lenart Authored: Sat Nov 12 17:39:43 2016 +0100 Committer: Lukasz Lenart Committed: Sat Nov 12 17:39:43 2016 +0100 ---------------------------------------------------------------------- core/src/main/java/org/apache/struts2/components/Param.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/986b43f3/core/src/main/java/org/apache/struts2/components/Param.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/struts2/components/Param.java b/core/src/main/java/org/apache/struts2/components/Param.java index acdbd26..9976d22 100644 --- a/core/src/main/java/org/apache/struts2/components/Param.java +++ b/core/src/main/java/org/apache/struts2/components/Param.java @@ -138,6 +138,8 @@ public class Param extends Component { if (suppressEmptyParameters) { if (value != null && StringUtils.isNotBlank(value.toString())) { component.addParameter(name, value); + } else { + component.addParameter(name, null); } } else if (value == null || StringUtils.isBlank(value.toString())) { component.addParameter(name, ""); @@ -151,6 +153,8 @@ public class Param extends Component { } else { if (!(suppressEmptyParameters && StringUtils.isBlank(body))) { component.addParameter(findString(name), body); + } else { + component.addParameter(findString(name), null); } } }