You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2002/05/15 15:20:48 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs DependSet.java
bodewig 02/05/15 06:20:48
Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
DependSet.java
Log:
Gracefully handle <targetfilesets> in <dependset> - treat filesets
with a not-existing base dir like any other case of missing target
files (i.e. don't throw an exception).
Revision Changes Path
No revision
No revision
1.15.2.1 +6 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/DependSet.java
Index: DependSet.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/DependSet.java,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -r1.15 -r1.15.2.1
--- DependSet.java 15 Apr 2002 15:33:08 -0000 1.15
+++ DependSet.java 15 May 2002 13:20:48 -0000 1.15.2.1
@@ -110,7 +110,7 @@
*
* @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a>
* @ant.task category="filesystem"
- * @version $Revision: 1.15 $ $Date: 2002/04/15 15:33:08 $
+ * @version $Revision: 1.15.2.1 $ $Date: 2002/05/15 13:20:48 $
* @since Ant 1.4
*/
public class DependSet extends MatchingTask {
@@ -190,6 +190,11 @@
while (enumTargetSets.hasMoreElements()) {
FileSet targetFS = (FileSet) enumTargetSets.nextElement();
+ if (!targetFS.getDir(getProject()).exists()) {
+ // this is the same as if it was empty, no target files found
+ continue;
+ }
+
DirectoryScanner targetDS = targetFS.getDirectoryScanner(project);
String[] targetFiles = targetDS.getIncludedFiles();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>