commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io AbstractBeanWriter.java
Date Sat, 12 Oct 2002 15:26:23 GMT
jstrachan    2002/10/12 08:26:22

  Modified:    betwixt/src/java/org/apache/commons/betwixt/io
                        AbstractBeanWriter.java
  Log:
  An attempt to patch Johan Lundberg's issue when using betwixt with Torque
  
  Revision  Changes    Path
  1.5       +10 -6     jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/AbstractBeanWriter.java
  
  Index: AbstractBeanWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/AbstractBeanWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractBeanWriter.java	14 Aug 2002 18:50:21 -0000	1.4
  +++ AbstractBeanWriter.java	12 Oct 2002 15:26:22 -0000	1.5
  @@ -486,6 +486,10 @@
                           // XXXX: should we handle nulls better
                           if ( childBean instanceof Iterator ) {
                               for ( Iterator iter = (Iterator) childBean; iter.hasNext();
) {
  +                                Object object = iter.next();
  +                                if (object == null) {
  +                                    continue;
  +                                }
                                   if ( ! writtenContent ) {
                                       writtenContent = true;
                                       if (elementDescriptor.isWrapCollectionsInElement())
{
  @@ -493,7 +497,7 @@
                                       }
                                   }
                                   ++indentLevel;
  -                                write( qualifiedName, iter.next() );
  +                                write( qualifiedName, object );
                                   --indentLevel;
                               }
                           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message