ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Zip.java
Date Tue, 24 Apr 2001 07:13:33 GMT
bodewig     01/04/24 00:13:33

  Modified:    src/main/org/apache/tools/ant/taskdefs Zip.java
  Log:
  Fix stupid NPE introduced with my ZIP changes.
  
  Revision  Changes    Path
  1.37      +3 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Zip.java	2001/04/23 16:12:12	1.36
  +++ Zip.java	2001/04/24 07:13:31	1.37
  @@ -278,11 +278,13 @@
           File zipSrc = fs.getSrc();
   
           ZipEntry entry;
  +        java.util.zip.ZipEntry origEntry;
           ZipInputStream in = null;
           try {
               in = new ZipInputStream(new FileInputStream(zipSrc));
   
  -            while ((entry = new ZipEntry(in.getNextEntry())) != null) {
  +            while ((origEntry = in.getNextEntry()) != null) {
  +                entry = new ZipEntry(origEntry);
                   String vPath = entry.getName();
                   if (zipScanner.match(vPath)) {
                       addParentDirs(null, vPath, zOut, prefix);
  
  
  

Mime
View raw message