You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by br...@apache.org on 2003/07/25 18:18:23 UTC
cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding JXPathBindingBase.java
bruno 2003/07/25 09:18:22
Modified: src/blocks/woody/java/org/apache/cocoon/woody/binding
JXPathBindingBase.java
Log:
check that supplied object is not null
Revision Changes Path
1.3 +4 -0 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/JXPathBindingBase.java
Index: JXPathBindingBase.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/JXPathBindingBase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- JXPathBindingBase.java 24 Jul 2003 12:39:17 -0000 1.2
+++ JXPathBindingBase.java 25 Jul 2003 16:18:22 -0000 1.3
@@ -80,6 +80,8 @@
* the new overloaded version of this method.
*/
public final void loadFormFromModel(Widget frmModel, Object objModel) {
+ if (objModel == null)
+ throw new NullPointerException("null object passed to loadFormFromModel() method");
JXPathContext jxpc;
if (!(objModel instanceof JXPathContext)) {
jxpc = JXPathContext.newContext(objModel);
@@ -102,6 +104,8 @@
* the new overloaded version of this method.
*/
public void saveFormToModel(Widget frmModel, Object objModel) throws BindingException {
+ if (objModel == null)
+ throw new NullPointerException("null object passed to saveFormToModel() method");
JXPathContext jxpc;
if (!(objModel instanceof JXPathContext)) {
jxpc = JXPathContext.newContext(objModel);