struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/2] struts git commit: WW-4701 Drop parameter if not defined
Date Sat, 12 Nov 2016 16:40:20 GMT
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 <lukaszlenart@apache.org>
Authored: Sat Nov 12 17:39:43 2016 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
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);
                 }
             }
         }


Mime
View raw message