db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1060) ResultSet methods should throw exception when the ResultSet is closed
Date Fri, 03 Mar 2006 10:15:45 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1060?page=all ]

Knut Anders Hatlen updated DERBY-1060:

    Attachment: derby1060-v1.diff

Attached patch derby1060-v1.diff.

The patch adds calls to checkIfClosed (embeddded) or
checkForClosedResultSet (network client) in the ResultSet methods
which don't check whether the ResultSet is closed. It also adds a test
case to jdbc4/TestResultSetMethods.java.

lang/closed.java is perhaps a more natural place for the test case,
but I chose to put it into the jdbc4 suite because

  a) lang/closed.java does not run under DerbyNetClient

  b) lang/closed.java is supposed to be able to run under JVM 1.3, so
     testing JDBC3 and JDBC4 methods was harder

  c) throwing exception is a JDBC4 requirement (not clearly stated in
     previous versions of the spec)

Derbyall ran without errors (Solaris 10 x86/Sun JVM 1.5.0). Jdbc4
suite ran without errors on Sun JVM 1.6.0-beta2-b74.

> ResultSet methods should throw exception when the ResultSet is closed
> ---------------------------------------------------------------------
>          Key: DERBY-1060
>          URL: http://issues.apache.org/jira/browse/DERBY-1060
>      Project: Derby
>         Type: Bug
>   Components: JDBC, Network Client, Newcomer
>     Versions:
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>  Attachments: derby1060-v1.diff, derby1060-v1.stat, derbyall_report.txt
> The JDBC 4 spec says:
>   Once a ResultSet has been closed, any attempt to access any of its
>   methods with the exception of the isClosed method will result in a
>   SQLException being thrown.
> This is not always the case in Derby, and the behaviour is not the
> same on the client driver and the embedded driver.
> The following ResultSet methods do not throw an exception when the
> result set is closed:
>   Client driver:
>     clearWarnings()
>     close()
>     getMetaData()
>     getStatement()
>     getWarnings()
>   Embedded driver:
>     close()
>     getConcurrency()
>     getRow()
>     getStatement()
>     getType()
>     rowDeleted()
>     rowInserted()
>     rowUpdated()
>     setFetchDirection()
>     getFetchDirection()
>     setFetchSize()
>     getFetchSize()

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message