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-1234) Verify that we raise SQLException when calling methods on closed java.sql objects
Date Tue, 25 Apr 2006 20:12:03 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1234?page=all ]

Knut Anders Hatlen updated DERBY-1234:

    Attachment: derby-1234-part1.diff

Removed getTypeMap() from EmbedConnection40 and NetConnection40. The
method is an existing JDBC 2.0 method. The method was presumably added
to the 4.0 classes because JDBC 4.0 modified the return type from Map
to Map<String,Class<?>>. It is however not a problem to use the
existing methods which just return Map. Actually, the Generics
Tutorial (http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf)
says this about a similar case:

  So, shouldn't this be an error? Theoretically speaking, yes; but
  practically speaking, if generic code is going to call legacy code,
  this has to be allowed.

Committed patch 'derby-1234-part1.diff' into svn revision 396972.

This fixes the problem with getTypeMap() throwing
UnsupportedOperationException, but EmbedConnection.getTypeMap() still
doesn't throw exception when the connection is closed.

> Verify that we raise SQLException when calling methods on closed java.sql objects
> ---------------------------------------------------------------------------------
>          Key: DERBY-1234
>          URL: http://issues.apache.org/jira/browse/DERBY-1234
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions:
>     Reporter: Rick Hillegas
>     Assignee: Knut Anders Hatlen
>      Fix For:
>  Attachments: derby-1234-part1.diff, derby-1234-v1.diff, derby-1234-v1.stat
> The next rev of the JDBC4 spec will clarify that databases should raise SQLException
when an application calls methods on closed sql objects: ResultSet, Preparedstatement, CallableStatement,
Connection, and Statement. We should verify that we conform.

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