Modified:
branches/branch_5_0/connector-j/src/com/mysql/jdbc/Statement.java
Log:
Fixed missed merge of checkClosed() and null reference check of connection in getWarnings() from 3.1 branch.
Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/Statement.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/Statement.java 2005-08-17 14:15:26 UTC (rev 4088)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/Statement.java 2005-08-17 14:20:10 UTC (rev 4089)
@@ -1508,7 +1508,11 @@
* if a database access error occurs
*/
public synchronized java.sql.SQLWarning getWarnings() throws SQLException {
- if (this.connection.versionMeetsMinimum(4, 1, 0)) {
+ checkClosed();
+
+ if (this.connection != null &&
+ !this.connection.isClosed() &&
+ this.connection.versionMeetsMinimum(4, 1, 0)) {
SQLWarning pendingWarningsFromServer = SQLError
.convertShowWarningsToSQLWarnings(this.connection);
| Thread |
|---|
| • Connector/J commit: r4089 - branches/branch_5_0/connector-j/src/com/mysql/jdbc | mmatthews | 17 Aug |