java.sql.Statement.executeBatch() with empty batch list
Thomas Bensler <[email protected]> Sun, 27 Mar 2005 15:06:46 +0200
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Message-ID | <[email protected]> |
Hi there,
The method com.mckoi.database.jdbc.MStatement.executeBatch() throws a
SQLException("Batch list is empty - nothing to do.") when batch list is
empty.
It is imho not very convenient for client code to check if there is
nothing to do before. The api doc of java.sql.Statement.executeBatch()
does not require an exception to be thrown in such situation.
I think it would be a good idea to replace line 69 throwing the exception
throw new SQLException("Batch list is empty - nothing to do.");
with
batch_list = new Vector();
.
Any objections?
Regards, Thomas.
---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]