struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/3] struts git commit: [WW-4831] convert nulls within arrays to empty strings rather than the 4 letters 'null'
Date Tue, 01 Aug 2017 13:56:44 GMT
Repository: struts
Updated Branches:
  refs/heads/master 62900ee98 -> 7f90a4fec


[WW-4831] convert nulls within arrays to empty strings rather than the 4 letters 'null'


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/8cc56b29
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/8cc56b29
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/8cc56b29

Branch: refs/heads/master
Commit: 8cc56b2974e5c744954b110e645f61f18e0b12ab
Parents: 91ae344
Author: thrawnca <shell_layer-github@yahoo.com.au>
Authored: Tue Aug 1 11:51:20 2017 +1000
Committer: thrawnca <shell_layer-github@yahoo.com.au>
Committed: Tue Aug 1 11:51:20 2017 +1000

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/conversion/impl/StringConverter.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/8cc56b29/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java
b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java
index 61d2516..d8895e8 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java
@@ -14,6 +14,7 @@ import java.util.Date;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 
 public class StringConverter extends DefaultTypeConverter {
 
@@ -69,7 +70,7 @@ public class StringConverter extends DefaultTypeConverter {
             }
             return format.format(value);
         } else {
-            return String.valueOf(value);
+            return Objects.toString(value, null);
         }
     }
 


Mime
View raw message