Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Operating System: All
Platform: All
-
32441
Description
When closing an already closed
org.apache.commons.dbcp.PoolablePreparedStatement, a SQLException is thrown when
the isClosed() method returns true.
This seems to violate the contract of java.sql.Statement (super interface of
implemented PreparedStatement) whose javadoc reads " Calling the method close on
a Statement object that is already closed has no effect."
Work around exists – when ever closing a statement, also null out. Then,
before closing, check that it's non-null.