You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jeff Martin <je...@synamic.co.uk> on 2000/08/02 14:10:18 UTC

[PATCH] Fixes null pointer exception in SQLExec

If an execption is thrown when establishing the jdbc connection the conn
object is not initialised and so should not be rolledback

Index: src/main/org/apache/tools/ant/taskdefs/SQLExec.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.j
ava,v
retrieving revision 1.4
diff -r1.4 SQLExec.java
224c224
<                     conn.rollback();
---
>                     if(conn!=null)conn.rollback();
231c231
<                     conn.rollback();
---
>                     if(conn!=null)conn.rollback();