commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18617] New: - DelegatingPreparedStatement throws misleading exception
Date Wed, 02 Apr 2003 16:40:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18617>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18617

DelegatingPreparedStatement throws misleading exception

           Summary: DelegatingPreparedStatement throws misleading exception
           Product: Commons
           Version: 1.0 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: bemowski@yahoo.com


The checkOpen() method of DelegatingPreparedStatement throws a SQLExcpeption 
stating that 'Connection is closed.'.  This can be misleading, because in fact 
the Connection holding this prepared statement is open, the _prepared 
statement_ is closed.  The text of the SQLExcpetion should be changed 
to 'PreparedStatement is closed.'.

    protected void checkOpen() throws SQLException {
        if(_closed) {
            throw new SQLException("Connection is closed.");
        }
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message