ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Project.java
Date Tue, 05 Sep 2000 11:43:29 GMT
bodewig     00/09/05 04:43:27

  Modified:    src/main/org/apache/tools/ant Project.java
  Log:
  filtering would fail if the number of @ was an uneven number.
  Reported by:	Stover, Michael <Michael.Stover@usa.xerox.com>
  
  Revision  Changes    Path
  1.37      +6 -1      jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Project.java	2000/09/05 07:11:18	1.36
  +++ Project.java	2000/09/05 11:43:22	1.37
  @@ -758,7 +758,12 @@
                   String value = null;
   
                   do {
  -                    token = s.substring(index + TOKEN_START.length(), s.indexOf(TOKEN_END,
index + TOKEN_START.length() + 1));
  +                    int endIndex = s.indexOf(TOKEN_END, 
  +                                             index + TOKEN_START.length() + 1);
  +                    if (endIndex == -1) {
  +                        break;
  +                    }
  +                    token = s.substring(index + TOKEN_START.length(), endIndex);
                       b.append(s.substring(i, index));
                       if (tokens.containsKey(token)) {
                           value = (String) tokens.get(token);
  
  
  

Mime
View raw message