Browse Source

Useless temporary variables mostly.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277143 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
f544eb807a
1 changed files with 12 additions and 10 deletions
  1. +12
    -10
      src/main/org/apache/tools/ant/types/Path.java

+ 12
- 10
src/main/org/apache/tools/ant/types/Path.java View File

@@ -96,12 +96,18 @@ public class Path extends DataType implements Cloneable {
/**
* Invoked by IntrospectionHelper for <code>setXXX(Path p)</code>
* attribute setters.
* @param project the <CODE>Project</CODE> for this path.
* @param path the <CODE>String</CODE> path definition.
*/
public Path(Project p, String path) {
this(p);
createPathElement().setPath(path);
}

/**
* Construct an empty <CODE>Path</CODE>.
* @param project the <CODE>Project</CODE> for this path.
*/
public Path(Project project) {
setProject(project);
elements = new Vector();
@@ -122,7 +128,7 @@ public class Path extends DataType implements Cloneable {

/**
* Parses a path definition and creates single PathElements.
* @param path the path definition.
* @param path the <CODE>String</CODE> path definition.
*/
public void setPath(String path) throws BuildException {
if (isReference()) {
@@ -322,21 +328,17 @@ public class Path extends DataType implements Cloneable {
}
} else if (o instanceof DirSet) {
DirSet dset = (DirSet) o;
DirectoryScanner ds = dset.getDirectoryScanner(getProject());
String[] s = ds.getIncludedDirectories();
File dir = dset.getDir(getProject());
addUnlessPresent(result, dir, s);
addUnlessPresent(result, dset.getDir(getProject()),
dset.getDirectoryScanner(getProject()).getIncludedDirectories());
} else if (o instanceof FileSet) {
FileSet fs = (FileSet) o;
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
String[] s = ds.getIncludedFiles();
File dir = fs.getDir(getProject());
addUnlessPresent(result, dir, s);
addUnlessPresent(result, dir, ds.getIncludedFiles());
} else if (o instanceof FileList) {
FileList fl = (FileList) o;
String[] s = fl.getFiles(getProject());
File dir = fl.getDir(getProject());
addUnlessPresent(result, dir, s);
addUnlessPresent(result,
fl.getDir(getProject()), fl.getFiles(getProject()));
}
}
String[] res = new String[result.size()];


Loading…
Cancel
Save