Invalid comparison of a StringBuffer and a String
-------------------------------------------------
Key: MSQL-32
URL: http://jira.codehaus.org/browse/MSQL-32
Project: Maven 2.x SQL Plugin
Issue Type: Bug
Affects Versions: 1.3, 1.4
Reporter: Florian Eitel
Priority: Trivial
Attachments: SqlExecMojo.java.patch
Hello,
you made a little Mistake at the SqlExecMojo Class. In the runStatements
Method you compare a StringBuffer with a String. The Result will be always
false.
----
StringBuffer sql = new StringBuffer();
...
if ( !sql.toString().equals( "" ) )
{
execSQL( sql.toString(), out );
}
----
The plugin don't crashes because you remove all empty Statements in the execSQL
Method again. Everything works fine but maybe you want to fix the bug anyway.
I attached a patch which is diffed against the trunk [2009-01-23].
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email