You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@locus.apache.org on 2000/08/02 14:18:25 UTC

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

bodewig     00/08/02 05:18:25

  Modified:    src/main/org/apache/tools/ant/taskdefs SQLExec.java
  Log:
  fixed NullPointerException in <sql>
  Submitted by:	Jeff Martin <je...@synamic.co.uk>
  
  Revision  Changes    Path
  1.5       +2 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SQLExec.java	2000/07/26 09:54:53	1.4
  +++ SQLExec.java	2000/08/02 12:18:25	1.5
  @@ -219,14 +219,14 @@
               }
               
           } catch(IOException e){
  -            if (!autocommit) {
  +            if (!autocommit && conn != null) {
                   try {
                       conn.rollback();
                   } catch (SQLException ex) {}
               }
               throw new BuildException(e, location);
           } catch(SQLException e){
  -            if (!autocommit) {
  +            if (!autocommit && conn != null) {
                   try {
                       conn.rollback();
                   } catch (SQLException ex) {}