You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by mp...@apache.org on 2003/12/29 16:30:28 UTC

cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding RepeaterJXPathBinding.java

mpo         2003/12/29 07:30:28

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/binding
                        RepeaterJXPathBinding.java
  Log:
  Avoiding NPE's on optional on-insert and on-delete sub-bindings.
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.14      +6 -2      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/RepeaterJXPathBinding.java
  
  Index: RepeaterJXPathBinding.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/RepeaterJXPathBinding.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RepeaterJXPathBinding.java	29 Dec 2003 06:14:48 -0000	1.13
  +++ RepeaterJXPathBinding.java	29 Dec 2003 15:30:28 -0000	1.14
  @@ -120,9 +120,13 @@
           this.rowBinding = new ComposedJXPathBindingBase(JXpathBindingBuilderBase.CommonAttributes.DEFAULT, childBindings);
           this.rowBinding.setParent(this);
           this.insertRowBinding = insertBinding;
  -        this.insertRowBinding.setParent(this);
  +        if (this.insertRowBinding != null) {
  +            this.insertRowBinding.setParent(this);
  +        }
           this.deleteRowBinding = new ComposedJXPathBindingBase(JXpathBindingBuilderBase.CommonAttributes.DEFAULT, deleteBindings);
  -        this.deleteRowBinding.setParent(this);
  +        if (this.deleteRowBinding != null) {
  +            this.deleteRowBinding.setParent(this);            
  +        }
       }