You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/08/28 07:44:18 UTC
[2/4] git commit: If you are wanting a Set, we should give you a Set
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 <jo...@apexcapitalcorp.com>
Authored: Tue Aug 26 16:39:54 2014 -0500
Committer: Josh Mabry <jo...@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();