struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/4] git commit: If you are wanting a Set, we should give you a Set
Date Thu, 28 Aug 2014 05:44:18 GMT
If you are wanting a Set, we should give you a Set


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

Branch: refs/heads/develop
Commit: ff17307afc1c3264d5abbb9beaf0690f0a471e68
Parents: 69baf69
Author: Josh Mabry <josh.mabry@apexcapitalcorp.com>
Authored: Tue Aug 26 16:39:54 2014 -0500
Committer: Josh Mabry <josh.mabry@apexcapitalcorp.com>
Committed: Tue Aug 26 16:39:54 2014 -0500

----------------------------------------------------------------------
 .../xwork2/conversion/impl/InstantiatingNullHandler.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/ff17307a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
index 6e91047..188e92d 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java
@@ -149,7 +149,9 @@ public class InstantiatingNullHandler implements NullHandler {
     }
 
     private Object createObject(Class clazz, Object target, String property, Map<String,
Object> context) throws Exception {
-        if (Collection.class.isAssignableFrom(clazz)) {
+        if (Set.class.isAssignableFrom(clazz)) {
+            return new HashSet();
+        } else if (Collection.class.isAssignableFrom(clazz)) {
             return new ArrayList();
         } else if (clazz == Map.class) {
             return new HashMap();


Mime
View raw message