diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java
index 7da4c9813..b3837fb3f 100644
--- a/src/main/org/apache/tools/ant/types/Path.java
+++ b/src/main/org/apache/tools/ant/types/Path.java
@@ -96,12 +96,18 @@ public class Path extends DataType implements Cloneable {
/**
* Invoked by IntrospectionHelper for setXXX(Path p)
* attribute setters.
+ * @param project the Project
for this path.
+ * @param path the String
path definition.
*/
public Path(Project p, String path) {
this(p);
createPathElement().setPath(path);
}
+ /**
+ * Construct an empty Path
.
+ * @param project the Project
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 String
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()];