bodewig 00/09/27 02:00:31
Modified: src/main/org/apache/tools/ant/taskdefs SQLExec.java
Log:
Make sure the JDBC driver knows how to handle the URL.
Revision Changes Path
1.8 +5 -0
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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SQLExec.java 2000/09/27 07:42:23 1.7
+++ SQLExec.java 2000/09/27 09:00:29 1.8
@@ -289,6 +289,11 @@
info.put("password", password);
conn = driverInstance.connect(url, info);
+ if (conn == null) {
+ // Driver doesn't understand the URL
+ throw new SQLException("No suitable Driver for "+url);
+ }
+
conn.setAutoCommit(autocommit);
statement = conn.createStatement();