ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Target.java
Date Mon, 01 Oct 2001 07:03:04 GMT
conor       01/10/01 00:03:04

  Modified:    src/main/org/apache/tools/ant Tag: ANT_14_BRANCH Target.java
  Log:
  Handle pathalogical cases in depends list
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.22.2.4  +3 -3      jakarta-ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.22.2.3
  retrieving revision 1.22.2.4
  diff -u -w -u -r1.22.2.3 -r1.22.2.4
  --- Target.java	2001/09/30 13:23:26	1.22.2.3
  +++ Target.java	2001/10/01 07:03:04	1.22.2.4
  @@ -88,7 +88,7 @@
                   String token = tok.nextToken().trim();
   
                   //Make sure the dependency is not empty string
  -                if (token.equals("")) {
  +                if (token.equals("") || token.equals(",")) {
                       throw new BuildException( "Syntax Error: Depend attribute " +
                                                 "for target \"" + getName() + 
                                                 "\" has an empty string for dependency."
);
  @@ -99,8 +99,8 @@
                   //Make sure that depends attribute does not
                   //end in a ,
                   if (tok.hasMoreTokens()) {
  -                    tok.nextToken();
  -                    if (!tok.hasMoreTokens()) {
  +                    token = tok.nextToken();
  +                    if (!tok.hasMoreTokens() || !token.equals(",")) {
                           throw new BuildException( "Syntax Error: Depend attribute " +
                                                     "for target \"" + getName() + 
                                                     "\" ends with a , character" );
  
  
  

Mime
View raw message