Commits

plightbo  committed 1e68831

getting ready to handle collections

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@152e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 2296ec6

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork/util/InstantiatingNullHandler.java

 
         try {
             Class clazz = method.getParameterTypes()[0];
-            Object param = clazz.newInstance();
+            Object param = createObject(clazz, context);
             method.invoke(target, new Object[]{param});
 
             return param;
         return null;
     }
 
+    private Object createObject(Class clazz, Map context) throws InstantiationException, IllegalAccessException {
+        return clazz.newInstance();
+    }
+
     /**
      * Attempt to find the setter associated with the provided instance and propertyName.  If we do find it, place that
      * Method into the methodMap keyed by property name