Browse Source

Avoid NPE if database doesn't match expected vendor

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@675911 13f79535-47bb-0310-9956-ffa450edef68
remotes/1776816827838153613/tmp_25f451bd36ab3145e487fcb2cd5c62c571e5b602
Stefan Bodewig 18 years ago
parent
commit
d6bde1c2c9
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/SQLExec.java

+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/SQLExec.java View File

@@ -436,6 +436,11 @@ public class SQLExec extends JDBCTask {
t.setSrc(srcFile); t.setSrc(srcFile);
t.addText(sqlCommand); t.addText(sqlCommand);


if (getConnection() == null) {
// not a valid rdbms
return;
}

try { try {
PrintStream out = System.out; PrintStream out = System.out;
try { try {


Loading…
Cancel
Save