ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Expand.java
Date Fri, 07 Feb 2003 15:02:43 GMT
bodewig     2003/02/07 07:02:43

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Expand.java
  Log:
  Merge revised fix for 11100 from HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.30.2.5  +17 -9     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Expand.java
  
  Index: Expand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Expand.java,v
  retrieving revision 1.30.2.4
  retrieving revision 1.30.2.5
  diff -u -r1.30.2.4 -r1.30.2.5
  --- Expand.java	6 Feb 2003 17:28:36 -0000	1.30.2.4
  +++ Expand.java	7 Feb 2003 15:02:43 -0000	1.30.2.5
  @@ -130,8 +130,8 @@
           if (filesets.size() > 0) {
               for (int j = 0; j < filesets.size(); j++) {
                   FileSet fs = (FileSet) filesets.elementAt(j);
  -                DirectoryScanner ds = fs.getDirectoryScanner(project);
  -                File fromDir = fs.getDir(project);
  +                DirectoryScanner ds = fs.getDirectoryScanner(getProject());
  +                File fromDir = fs.getDir(getProject());
   
                   String[] files = ds.getIncludedFiles();
                   for (int i = 0; i < files.length; ++i) {
  @@ -182,17 +182,25 @@
               String name = entryName;
               boolean included = false;
               for (int v = 0; v < patternsets.size(); v++) {
  -                included = true;
                   PatternSet p = (PatternSet) patternsets.elementAt(v);
                   String[] incls = p.getIncludePatterns(getProject());
  -                if (incls != null) {
  -                    for (int w = 0; w < incls.length; w++) {
  -                        included = DirectoryScanner.match(incls[w], name);
  -                        if (included) {
  -                            break;
  -                        }
  +                if (incls == null || incls.length == 0) {
  +                    // no include pattern implicitly means includes="**"
  +                    incls = new String[] {"**"};
  +                }
  +                    
  +                for (int w = 0; w < incls.length; w++) {
  +                    included = DirectoryScanner.match(incls[w], name);
  +                    if (included) {
  +                        break;
                       }
                   }
  +                
  +                if (!included) {
  +                    break;
  +                }
  +                
  +
                   String[] excls = p.getExcludePatterns(getProject());
                   if (excls != null) {
                       for (int w = 0; w < excls.length; w++) {
  
  
  

Mime
View raw message