Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #88 from nitincchauhan/master
clearWarnings() must throw exception on closed connection
  • Loading branch information
rusher committed Aug 22, 2016
2 parents 8bcfb76 + e814b47 commit 051e0cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/mariadb/jdbc/MariaDbConnection.java
Expand Up @@ -857,6 +857,9 @@ public SQLWarning getWarnings() throws SQLException {
* @throws SQLException SQLException if a database access error occurs or this method is called on a closed connection
*/
public void clearWarnings() throws SQLException {
if (this.isClosed()) {
throw ExceptionMapper.getSqlException("Connection.clearWarnings cannot be called on a closed connection");
}
warningsCleared = true;
}

Expand Down

0 comments on commit 051e0cf

Please sign in to comment.