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 Wed, 02 Aug 2000 12:18:25 GMT
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 <jeff.martin@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) {}
  
  
  

Mime
View raw message