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/taskdefs SQLExec.java
Date Wed, 19 Sep 2001 11:45:19 GMT
conor       01/09/19 04:45:19

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_14_BRANCH
                        SQLExec.java
  Log:
  Handle REM statements in SQL correctly.
  
  PR:	3556
  Submitted by:	Magesh Umasankar <umagesh@rediffmail.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.22.2.1  +7 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.22
  retrieving revision 1.22.2.1
  diff -u -w -u -r1.22 -r1.22.2.1
  --- SQLExec.java	2001/08/01 15:33:42	1.22
  +++ SQLExec.java	2001/09/19 11:45:19	1.22.2.1
  @@ -497,8 +497,13 @@
                                                          project.getProperties());
                   if (line.startsWith("//")) continue;
                   if (line.startsWith("--")) continue;
  -                if (line.length() > 2 &&
  -                    line.substring(0,3).equalsIgnoreCase("REM")) continue;
  +                StringTokenizer st = new StringTokenizer(line);
  +                if (st.hasMoreTokens()) {
  +                    String token = st.nextToken();
  +                    if ("REM".equalsIgnoreCase(token)) {
  +                        continue;
  +                    }
  +                }
   
                   sql += " " + line;
                   sql = sql.trim();
  
  
  

Mime
View raw message