Commits

Anonymous committed e4c217a

- added an if statement to only push the model into the stack if it is not null.
If a null is push on top of the stack (as part of CompoundRoot) NPE will be thrown
when accessing property of the CompoundRoot element that is null

Issue number:
Obtained from:
Submitted by:
Reviewed by:

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

  • Participants
  • Parent commits ff92685

Comments (0)

Files changed (1)

File java/com/opensymphony/xwork/interceptor/ModelDrivenInterceptor.java

  * </action>
  * <!-- END SNIPPET: example -->
  * </pre>
+ * 
+ * @author tm_jee
+ * @version $Date$ $Id$
  */
 public class ModelDrivenInterceptor extends AroundInterceptor {
 
         if (action instanceof ModelDriven) {
             ModelDriven modelDriven = (ModelDriven) action;
             OgnlValueStack stack = invocation.getStack();
-            stack.push(modelDriven.getModel());
+            if (modelDriven.getModel() !=  null) {
+            	stack.push(modelDriven.getModel());
+            }
         }
     }
 }