mbenson 2004/12/07 14:15:33
Modified: src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH
Path.java
Log:
merge
Revision Changes Path
No revision
No revision
1.57.2.6 +13 -12 ant/src/main/org/apache/tools/ant/types/Path.java
Index: Path.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Path.java,v
retrieving revision 1.57.2.5
retrieving revision 1.57.2.6
diff -u -r1.57.2.5 -r1.57.2.6
--- Path.java 23 Jun 2004 13:33:18 -0000 1.57.2.5
+++ Path.java 7 Dec 2004 22:15:33 -0000 1.57.2.6
@@ -96,12 +96,18 @@
/**
* 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 @@
/**
* 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,16 @@
}
} 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, fs.getDir(getProject()),
+ fs.getDirectoryScanner(getProject()).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()];
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]