You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@apache.org on 2001/07/07 02:11:19 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs SQLExec.java

conor       01/07/06 17:11:19

  Modified:    src/main/org/apache/tools/ant/taskdefs SQLExec.java
  Log:
  Don't try to print out result set if the execute method returns false
  
  PR:	1727
  Submitted by:	Gael_Marziou@hp.com (Gael Marziou)
  
  Revision  Changes    Path
  1.18      +4 -3      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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SQLExec.java	2001/05/10 15:25:43	1.17
  +++ SQLExec.java	2001/07/07 00:11:18	1.18
  @@ -524,9 +524,10 @@
                   log(statement.getUpdateCount()+" rows affected", 
                       Project.MSG_VERBOSE);
               }
  -            
  -            if (print) {
  -                printResults(out);
  +            else {
  +                if (print) {
  +                    printResults(out);
  +                }
               }
               
               SQLWarning warning = conn.getWarnings();