mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正jdbc 3.0 driver的bug
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@324 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -39,6 +39,7 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
|
||||
|
||||
private final ResultSet rs;
|
||||
private final PoolableStatement stmt;
|
||||
private boolean closed = false;
|
||||
|
||||
public PoolableResultSet(PoolableStatement stmt, ResultSet rs){
|
||||
this.stmt = stmt;
|
||||
@@ -70,6 +71,7 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
|
||||
public void close() throws SQLException {
|
||||
try {
|
||||
rs.close();
|
||||
this.closed = true;
|
||||
} catch (Throwable t) {
|
||||
throw checkException(t);
|
||||
}
|
||||
@@ -1359,6 +1361,10 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
|
||||
|
||||
@Override
|
||||
public boolean isClosed() throws SQLException {
|
||||
if (this.closed) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
return rs.isClosed();
|
||||
} catch (Throwable t) {
|
||||
|
||||
Reference in New Issue
Block a user