Browse Source

remove some deprecated methods and 1.1 holdovers

Bugzilla: 22326


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275071 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 22 years ago
parent
commit
0c43380c15
4 changed files with 12 additions and 13 deletions
  1. +5
    -5
      src/main/org/apache/tools/ant/ComponentHelper.java
  2. +3
    -3
      src/main/org/apache/tools/ant/helper/ProjectHelper2.java
  3. +4
    -4
      src/main/org/apache/tools/ant/types/AbstractFileSet.java
  4. +0
    -1
      src/main/org/apache/tools/ant/types/CommandlineJava.java

+ 5
- 5
src/main/org/apache/tools/ant/ComponentHelper.java View File

@@ -54,8 +54,6 @@

package org.apache.tools.ant;

import org.apache.tools.ant.util.WeakishReference;

import java.util.Enumeration;
import java.util.Hashtable;
import java.util.HashSet;
@@ -67,6 +65,7 @@ import java.util.Stack;
import java.util.Vector;
import java.io.InputStream;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.lang.reflect.Modifier;

import org.apache.tools.ant.taskdefs.Typedef;
@@ -87,6 +86,7 @@ import org.apache.tools.ant.taskdefs.Typedef;
*
* @author Costin Manolache
* @author Peter Reilly
* @author <a href="mailto:martijn@kruithof.xs4all.nl">Martijn Kruithof</a>
* @since Ant1.6
*/
public class ComponentHelper {
@@ -551,7 +551,7 @@ public class ComponentHelper {
v = new Vector();
createdTasks.put(type, v);
}
v.addElement(WeakishReference.createReference(task));
v.addElement(new WeakReference(task));
}
}

@@ -568,8 +568,8 @@ public class ComponentHelper {
if (v != null) {
Enumeration taskEnum = v.elements();
while (taskEnum.hasMoreElements()) {
WeakishReference ref =
(WeakishReference) taskEnum.nextElement();
WeakReference ref =
(WeakReference) taskEnum.nextElement();
Task t = (Task) ref.get();
//being a weak ref, it may be null by this point
if (t != null) {


+ 3
- 3
src/main/org/apache/tools/ant/helper/ProjectHelper2.java View File

@@ -641,7 +641,7 @@ public class ProjectHelper2 extends ProjectHelper {
if (key.equals("default")) {
if (value != null && !value.equals("")) {
if (!context.isIgnoringProjectTag()) {
project.setDefaultTarget(value);
project.setDefault(value);
}
}
} else if (key.equals("name")) {
@@ -707,8 +707,8 @@ public class ProjectHelper2 extends ProjectHelper {
if ((new File(baseDir)).isAbsolute()) {
project.setBasedir(baseDir);
} else {
project.setBaseDir(project.resolveFile(baseDir,
context.getBuildFileParent()));
project.setBaseDir(fu.resolveFile(
context.getBuildFileParent(), baseDir));
}
}
}


+ 4
- 4
src/main/org/apache/tools/ant/types/AbstractFileSet.java View File

@@ -97,6 +97,7 @@ import org.apache.tools.ant.types.selectors.SizeSelector;
* @author Stefan Bodewig
* @author Magesh Umasankar
* @author <a href="mailto:bruce@callenish.com">Bruce Atherton</a>
* @author <a href="mailto:martijn@kruithof.xs4all.nl">Martijn Kruithof</a>
*/
public abstract class AbstractFileSet extends DataType implements Cloneable,
SelectorContainer {
@@ -208,7 +209,7 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
}

/**
* add a name entry on the include files list
* add a name entry on the excludes files list
*/
public PatternSet.NameEntry createExcludesFile() {
if (isReference()) {
@@ -224,8 +225,7 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
if (isReference()) {
throw tooManyAttributes();
}
FileUtils fileUtils = FileUtils.newFileUtils();
setDir(fileUtils.getParentFile(file));
setDir(file.getParentFile());

PatternSet.NameEntry include = createInclude();
include.setName(file.getName());
@@ -277,7 +277,7 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
}

/**
* Sets the name of the file containing the includes patterns.
* Sets the name of the file containing the excludes patterns.
*
* @param excl The file to fetch the exclude patterns from.
*/


+ 0
- 1
src/main/org/apache/tools/ant/types/CommandlineJava.java View File

@@ -58,7 +58,6 @@ import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector;
import java.util.List;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.ListIterator;



Loading…
Cancel
Save