peterreilly    2005/03/01 01:48:36

  Modified:    src/main/org/apache/tools/ant/taskdefs Zip.java
  Log:
  NPE when adding comment to zip file that is not there
  PR: 33779
  
  Revision  Changes    Path
  1.138     +3 -1      ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- Zip.java  21 Feb 2005 08:40:16 -0000      1.137
  +++ Zip.java  1 Mar 2005 09:48:36 -0000       1.138
  @@ -553,7 +553,9 @@
                       }
                       addResources(oldFiles, r, zOut);
                   }
  -                zOut.setComment(comment);
  +                if (zOut != null) {
  +                    zOut.setComment(comment);
  +                }
                   finalizeZipOutputStream(zOut);
   
                   // If we've been successful on an update, delete the
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to