You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/07/11 12:40:44 UTC
svn commit: r675911 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
Author: bodewig
Date: Fri Jul 11 03:40:44 2008
New Revision: 675911
URL: http://svn.apache.org/viewvc?rev=675911&view=rev
Log:
Avoid NPE if database doesn't match expected vendor
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java?rev=675911&r1=675910&r2=675911&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java Fri Jul 11 03:40:44 2008
@@ -436,6 +436,11 @@
t.setSrc(srcFile);
t.addText(sqlCommand);
+ if (getConnection() == null) {
+ // not a valid rdbms
+ return;
+ }
+
try {
PrintStream out = System.out;
try {