incomplete in the case of XCatalog, I'll follow up on this. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271811 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -134,6 +134,12 @@ | |||||
| <!-- uses the context classloader --> | <!-- uses the context classloader --> | ||||
| <exclude name="${optional.package}/junit/JUnitClassLoaderTest.java" | <exclude name="${optional.package}/junit/JUnitClassLoaderTest.java" | ||||
| unless="jdk1.2+" /> | 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> | ||||
| <patternset id="needs.jdk1.3+"> | <patternset id="needs.jdk1.3+"> | ||||
| <exclude name="${ant.package}/taskdefs/TestProcess.java" | <exclude name="${ant.package}/taskdefs/TestProcess.java" | ||||
| @@ -253,7 +253,7 @@ public class Jar extends Zip { | |||||
| } | } | ||||
| // need to set the line.separator as \r\n due to a bug with the jar verifier | // 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/"); | zipDir(null, zOut, "META-INF/"); | ||||
| // time to write the manifest | // time to write the manifest | ||||
| @@ -271,7 +271,7 @@ public class Jar extends Zip { | |||||
| throw new BuildException("Invalid Manifest", e, getLocation()); | throw new BuildException("Invalid Manifest", e, getLocation()); | ||||
| } | } | ||||
| finally { | finally { | ||||
| System.setProperty("line.separator", ls); | |||||
| System.getProperties().put("line.separator", ls); | |||||
| } | } | ||||
| } | } | ||||
| @@ -752,8 +752,8 @@ public class Javadoc extends Task { | |||||
| String next = tok.nextToken().trim(); | String next = tok.nextToken().trim(); | ||||
| if (next.equals("all")) { | if (next.equals("all")) { | ||||
| if (gotAll) { | if (gotAll) { | ||||
| project.log ("Repeated tag scope element: all", | |||||
| Project.MSG_VERBOSE); | |||||
| getProject().log ("Repeated tag scope element: all", | |||||
| Project.MSG_VERBOSE); | |||||
| } | } | ||||
| gotAll=true; | gotAll=true; | ||||
| } | } | ||||
| @@ -768,8 +768,8 @@ public class Javadoc extends Task { | |||||
| } | } | ||||
| else { | else { | ||||
| if (elements[i]) { | 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; | elements[i]=true; | ||||
| gotNotAll=true; | gotNotAll=true; | ||||
| @@ -304,7 +304,7 @@ public class Zip extends MatchingTask { | |||||
| log("Adding file " + files[j] + " to fileset", Project.MSG_VERBOSE); | log("Adding file " + files[j] + " to fileset", Project.MSG_VERBOSE); | ||||
| ZipFileSet zf = new ZipFileSet(); | ZipFileSet zf = new ZipFileSet(); | ||||
| zf.setSrc(new File(basedir, files[j])); | zf.setSrc(new File(basedir, files[j])); | ||||
| filesets.add(zf); | |||||
| filesets.addElement(zf); | |||||
| } | } | ||||
| } | } | ||||
| @@ -852,12 +852,12 @@ public class Zip extends MatchingTask { | |||||
| */ | */ | ||||
| protected void cleanUp() { | protected void cleanUp() { | ||||
| addedDirs.clear(); | addedDirs.clear(); | ||||
| addedFiles.clear(); | |||||
| filesets.clear(); | |||||
| addedFiles.removeAllElements(); | |||||
| filesets.removeAllElements(); | |||||
| zipFile = null; | zipFile = null; | ||||
| baseDir = null; | baseDir = null; | ||||
| entries.clear(); | entries.clear(); | ||||
| groupfilesets.clear(); | |||||
| groupfilesets.removeAllElements(); | |||||
| duplicate = "add"; | duplicate = "add"; | ||||
| archiveType = "zip"; | archiveType = "zip"; | ||||
| doCompress = true; | doCompress = true; | ||||
| @@ -59,7 +59,7 @@ import java.io.FileInputStream; | |||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.util.Iterator; | |||||
| import java.util.Enumeration; | |||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| @@ -121,7 +121,7 @@ public class XCatalog extends DataType implements Cloneable, EntityResolver { | |||||
| * @param aDTD the DTDLocation instance to be aded to the catalog | * @param aDTD the DTDLocation instance to be aded to the catalog | ||||
| */ | */ | ||||
| private void addElement(DTDLocation aDTD) { | private void addElement(DTDLocation aDTD) { | ||||
| getElements().add(aDTD); | |||||
| getElements().addElement(aDTD); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -135,7 +135,7 @@ public class XCatalog extends DataType implements Cloneable, EntityResolver { | |||||
| if (isReference()) { | if (isReference()) { | ||||
| throw noChildrenAllowed(); | throw noChildrenAllowed(); | ||||
| } | } | ||||
| getElements().add(dtd); | |||||
| getElements().addElement(dtd); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -242,10 +242,10 @@ public class XCatalog extends DataType implements Cloneable, EntityResolver { | |||||
| * of the DTD or null if no such information is available | * of the DTD or null if no such information is available | ||||
| */ | */ | ||||
| private DTDLocation findMatchingDTD(String publicId) { | private DTDLocation findMatchingDTD(String publicId) { | ||||
| Iterator elements = getElements().iterator(); | |||||
| Enumeration elements = getElements().elements(); | |||||
| DTDLocation element = null; | DTDLocation element = null; | ||||
| while (elements.hasNext()) { | |||||
| element = (DTDLocation)elements.next(); | |||||
| while (elements.hasMoreElements()) { | |||||
| element = (DTDLocation)elements.nextElement(); | |||||
| if (element.getPublicId().equals(publicId)) { | if (element.getPublicId().equals(publicId)) { | ||||
| return element; | return element; | ||||
| } | } | ||||