ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/filters LineContains.java
Date Mon, 17 Feb 2003 15:49:18 GMT
bodewig     2003/02/17 07:49:18

  Modified:    src/main/org/apache/tools/ant/filters Tag: ANT_15_BRANCH
                        LineContains.java
  Log:
  Merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.6   +13 -5     ant/src/main/org/apache/tools/ant/filters/LineContains.java
  
  Index: LineContains.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/filters/LineContains.java,v
  retrieving revision 1.4.2.5
  retrieving revision 1.4.2.6
  diff -u -r1.4.2.5 -r1.4.2.6
  --- LineContains.java	10 Feb 2003 14:24:40 -0000	1.4.2.5
  +++ LineContains.java	17 Feb 2003 15:49:18 -0000	1.4.2.6
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -144,10 +144,9 @@
               }
           } else {
               line = readLine();
  -            if (line == null) {
  -                ch = -1;
  -            } else {
  -                final int containsSize = contains.size();
  +            final int containsSize = contains.size();
  +
  +            while (line != null) {
                   for (int i = 0; i < containsSize; i++) {
                       String containsStr = (String) contains.elementAt(i);
                       if (line.indexOf(containsStr) == -1) {
  @@ -156,6 +155,15 @@
                       }
                   }
   
  +                if (line == null) {
  +                    // line didn't match
  +                    line = readLine();
  +                } else {
  +                    break;
  +                }
  +            }
  +
  +            if (line != null) {
                   return read();
               }
           }
  
  
  

Mime
View raw message