From 9a672c0324330cb54b5f0b95e09851cca8f9b76d Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Fri, 30 Dec 2005 19:51:44 +0000 Subject: [PATCH] A bug in SQLExec would prevent the execution of trailing, non-semicolon-delimited statements. Bugzilla Report 37764. Submitted by Dave Brosius. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@360155 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 3 +++ src/main/org/apache/tools/ant/taskdefs/SQLExec.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WHATSNEW b/WHATSNEW index 0d621a252..f02e95d93 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -65,6 +65,9 @@ Changes that could break older environments: file that somehow relied on content outside the firewall being unreachable: use the -noproxy command-line option to disable this new feature. +* A bug in SQLExec would prevent the execution of trailing, + non-semicolon-delimited statements. Bugzilla Report 37764. + Fixed bugs: ----------- diff --git a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java index b1da95b24..385ab6191 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java @@ -500,7 +500,7 @@ public class SQLExec extends JDBCTask { } } // Catch any statements not followed by ; - if (!sql.equals("")) { + if (sql.length() > 0) { execSQL(sql.toString(), out); } }