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/taskdefs SQLExec.java
Date Tue, 10 Oct 2000 14:56:41 GMT
bodewig     00/10/10 07:56:38

  Modified:    src/main/org/apache/tools/ant/taskdefs SQLExec.java
  Log:
  Make <sql> ignore empty "statements".
  
  Submitted by:	Jose  Alberto Fernandez <JFernandez@viquity.com>
  
  Revision  Changes    Path
  1.10      +5 -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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SQLExec.java	2000/09/29 15:51:13	1.9
  +++ SQLExec.java	2000/10/10 14:56:35	1.10
  @@ -482,6 +482,9 @@
        * Exec the sql statement.
        */
       protected void execSQL(String sql) throws SQLException {
  +        // Check and ignore empty statements
  +        if ("".equals(sql.trim())) return;
  +        
           try {  
               totalSql++;
               if (!statement.execute(sql)) {
  @@ -585,13 +588,13 @@
   
           private void runTransaction() throws IOException, SQLException {
               if (tSqlCommand.length() != 0) {
  -                log("Executing commands", Project.MSG_VERBOSE);
  +                log("Executing commands", Project.MSG_INFO);
                   runStatements(new StringReader(tSqlCommand));
               }
         
               if (tSrcFile != null) {
                   log("Executing file: " + tSrcFile.getAbsolutePath(), 
  -                    Project.MSG_VERBOSE);
  +                    Project.MSG_INFO);
                   runStatements(new FileReader(tSrcFile));
               }
           }
  
  
  

Mime
View raw message