ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Expand.java
Date Thu, 21 Nov 2002 22:16:57 GMT
umagesh     2002/11/21 14:16:57

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Expand.java
  Log:
  Expand tasks did not behave as expected with PatternSets.
  
  PR: 11100
  Submitted by: gudnabrsam@yahoo.com
  
  Revision  Changes    Path
  1.327     +1 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.326
  retrieving revision 1.327
  diff -u -r1.326 -r1.327
  --- WHATSNEW	21 Nov 2002 21:47:52 -0000	1.326
  +++ WHATSNEW	21 Nov 2002 22:16:56 -0000	1.327
  @@ -19,6 +19,7 @@
   
   Fixed bugs:
   -----------
  +* Expand tasks did not behave as expected with PatternSets.
   
   * <property environment=... /> now works on OS/400.
   
  
  
  
  1.36      +5 -8      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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- Expand.java	3 Sep 2002 15:06:57 -0000	1.35
  +++ Expand.java	21 Nov 2002 22:16:57 -0000	1.36
  @@ -182,14 +182,13 @@
               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++) {
  -                        boolean isIncl =
  -                            DirectoryScanner.match(incls[w], name);
  -                        if (isIncl) {
  -                            included = true;
  +                        included = DirectoryScanner.match(incls[w], name);
  +                        if (included) {
                               break;
                           }
                       }
  @@ -197,10 +196,8 @@
                   String[] excls = p.getExcludePatterns(getProject());
                   if (excls != null) {
                       for (int w = 0; w < excls.length; w++) {
  -                        boolean isExcl =
  -                            DirectoryScanner.match(excls[w], name);
  -                        if (isExcl) {
  -                            included = false;
  +                        included = !(DirectoryScanner.match(excls[w], name));
  +                        if (!included) {
                               break;
                           }
                       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message