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 Thu, 23 Jan 2003 15:03:29 GMT
bodewig     2003/01/23 07:03:29

  Modified:    src/etc/testcases/taskdefs jar.xml
               src/main/org/apache/tools/ant/taskdefs Zip.java
  Log:
  Some cosmetics
  
  Revision  Changes    Path
  1.8       +0 -2      jakarta-ant/src/etc/testcases/taskdefs/jar.xml
  
  Index: jar.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/jar.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jar.xml	23 Jan 2003 11:40:13 -0000	1.7
  +++ jar.xml	23 Jan 2003 15:03:28 -0000	1.8
  @@ -43,8 +43,6 @@
   
     <target name="testRecreateNewerFileSetup" depends="test4">
       <touch file="jar.xml"/>
  -    <sleep seconds="3"/>
  -    <touch file="${tmp.jar}"/>
     </target>
   
     <target name="testRecreateWithoutUpdateAdditionalFiles">
  
  
  
  1.89      +6 -7      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.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- Zip.java	22 Jan 2003 13:27:13 -0000	1.88
  +++ Zip.java	23 Jan 2003 15:03:29 -0000	1.89
  @@ -77,7 +77,6 @@
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.PatternSet;
   import org.apache.tools.ant.types.Resource;
  -import org.apache.tools.ant.types.ResourceFactory;
   import org.apache.tools.ant.types.ZipFileSet;
   import org.apache.tools.ant.types.ZipScanner;
   import org.apache.tools.ant.util.FileNameMapper;
  @@ -101,7 +100,7 @@
    *
    * @ant.task category="packaging"
    */
  -public class Zip extends MatchingTask implements ResourceFactory {
  +public class Zip extends MatchingTask {
   
       protected File zipFile;
       // use to scan own archive
  @@ -127,7 +126,6 @@
   
       protected boolean doubleFilePass = false;
       protected boolean skipWriting = false;
  -    private FileUtils fileUtils;
   
   
       /**
  @@ -659,14 +657,14 @@
           return true;
       }
   
  -    public Resource getResource(String name) {
  -        if (zs==null) {
  +    private synchronized ZipScanner getZipScanner() {
  +        if (zs == null) {
               zs=new ZipScanner();
               // set the task of the zip scanner so that it can log properly
               zs.setTask(this);
               zs.setSrc(zipFile);
           }
  -        return zs.getResource(name);
  +        return zs;
       }
   
       /**
  @@ -741,7 +739,8 @@
                   Resource[] newerSources = 
                       SourceSelector.selectOutOfDateSources(this,
                                                             resourceNames[i],
  -                                                          myMapper, this);
  +                                                          myMapper,
  +                                                          getZipScanner());
                   result = (newerSources.length == 0);
                   if (!result) {
                       return result;
  
  
  

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


Mime
View raw message