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/types XCatalog.java
Date Mon, 11 Mar 2002 07:23:34 GMT
bodewig     02/03/10 23:23:34

  Modified:    .        build.xml
               src/main/org/apache/tools/ant/taskdefs Jar.java Javadoc.java
                        Zip.java
               src/main/org/apache/tools/ant/types XCatalog.java
  Log:
  JDK 1.1 fixes
  
  incomplete in the case of XCatalog, I'll follow up on this.
  
  Revision  Changes    Path
  1.264     +6 -0      jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.263
  retrieving revision 1.264
  diff -u -r1.263 -r1.264
  --- build.xml	9 Mar 2002 23:47:53 -0000	1.263
  +++ build.xml	11 Mar 2002 07:23:33 -0000	1.264
  @@ -134,6 +134,12 @@
       <!-- uses the context classloader -->
       <exclude name="${optional.package}/junit/JUnitClassLoaderTest.java"
                unless="jdk1.2+" />
  +
  +    <!-- I hope these are just temporary -->
  +    <exclude name="${ant.package}/types/XCatalog.java"
  +             unless="jdk1.2+" />
  +    <exclude name="${ant.package}/taskdefs/XSLTProcess.java"
  +             unless="jdk1.2+" />
     </patternset>
     <patternset id="needs.jdk1.3+">
       <exclude name="${ant.package}/taskdefs/TestProcess.java"
  
  
  
  1.41      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Jar.java	5 Mar 2002 14:27:09 -0000	1.40
  +++ Jar.java	11 Mar 2002 07:23:34 -0000	1.41
  @@ -253,7 +253,7 @@
               }
   
               // need to set the line.separator as \r\n due to a bug with the jar verifier
  -            System.setProperty("line.separator", "\r\n");
  +            System.getProperties().put("line.separator", "\r\n");
   
               zipDir(null, zOut, "META-INF/");
               // time to write the manifest
  @@ -271,7 +271,7 @@
               throw new BuildException("Invalid Manifest", e, getLocation());
           }
           finally {
  -            System.setProperty("line.separator", ls);
  +            System.getProperties().put("line.separator", ls);
           }
       }
   
  
  
  
  1.79      +4 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- Javadoc.java	3 Mar 2002 01:46:20 -0000	1.78
  +++ Javadoc.java	11 Mar 2002 07:23:34 -0000	1.79
  @@ -752,8 +752,8 @@
                   String next = tok.nextToken().trim();
                   if (next.equals("all")) {
                       if (gotAll) {   
  -                        project.log ("Repeated tag scope element: all", 
  -                                     Project.MSG_VERBOSE);
  +                        getProject().log ("Repeated tag scope element: all", 
  +                                          Project.MSG_VERBOSE);
                       }
                       gotAll=true;
                   }
  @@ -768,8 +768,8 @@
                       } 
                       else {
                           if (elements[i]) {
  -                            project.log ("Repeated tag scope element: "+next, 
  -                                         Project.MSG_VERBOSE);
  +                            getProject().log ("Repeated tag scope element: "+next, 
  +                                              Project.MSG_VERBOSE);
                           }
                           elements[i]=true;
                           gotNotAll=true;
  
  
  
  1.70      +4 -4      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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Zip.java	3 Mar 2002 06:52:07 -0000	1.69
  +++ Zip.java	11 Mar 2002 07:23:34 -0000	1.70
  @@ -304,7 +304,7 @@
                   log("Adding file " + files[j] + " to fileset", Project.MSG_VERBOSE);
                   ZipFileSet zf = new ZipFileSet();
                   zf.setSrc(new File(basedir, files[j]));
  -                filesets.add(zf);
  +                filesets.addElement(zf);
               }
           }
   
  @@ -852,12 +852,12 @@
        */
       protected void cleanUp() {
           addedDirs.clear();
  -        addedFiles.clear();
  -        filesets.clear();
  +        addedFiles.removeAllElements();
  +        filesets.removeAllElements();
           zipFile = null;
           baseDir = null;
           entries.clear();
  -        groupfilesets.clear();
  +        groupfilesets.removeAllElements();
           duplicate = "add";
           archiveType = "zip";
           doCompress = true;
  
  
  
  1.2       +7 -7      jakarta-ant/src/main/org/apache/tools/ant/types/XCatalog.java
  
  Index: XCatalog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/XCatalog.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XCatalog.java	5 Mar 2002 13:49:47 -0000	1.1
  +++ XCatalog.java	11 Mar 2002 07:23:34 -0000	1.2
  @@ -59,7 +59,7 @@
   import java.io.InputStream;
   import java.io.IOException;
   import java.net.URL;
  -import java.util.Iterator;
  +import java.util.Enumeration;
   import java.util.Vector;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  @@ -88,7 +88,7 @@
    * elements, or use Norman Walsh's entity resolver from xml-commons</p>
    *
    * @author  dIon Gillard
  - * @version $Id: XCatalog.java,v 1.1 2002/03/05 13:49:47 conor Exp $
  + * @version $Id: XCatalog.java,v 1.2 2002/03/11 07:23:34 bodewig Exp $
    */
   public class XCatalog extends DataType implements Cloneable, EntityResolver {
       
  @@ -121,7 +121,7 @@
        * @param aDTD the DTDLocation instance to be aded to the catalog
        */
       private void addElement(DTDLocation aDTD) {
  -        getElements().add(aDTD);
  +        getElements().addElement(aDTD);
       }
       
       /**
  @@ -135,7 +135,7 @@
           if (isReference()) {
               throw noChildrenAllowed();
           }
  -        getElements().add(dtd);
  +        getElements().addElement(dtd);
       }
       
       /**
  @@ -242,10 +242,10 @@
        *         of the DTD or null if no such information is available
        */
       private DTDLocation findMatchingDTD(String publicId) {
  -        Iterator elements = getElements().iterator();
  +        Enumeration elements = getElements().elements();
           DTDLocation element = null;
  -        while (elements.hasNext()) {
  -            element = (DTDLocation)elements.next();
  +        while (elements.hasMoreElements()) {
  +            element = (DTDLocation)elements.nextElement();
               if (element.getPublicId().equals(publicId)) {
                   return element;
               }
  
  
  

--
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