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] Commented: (DERBY-947) Miscellaneous PreparedStatement methods added by JDBC4
Date Wed, 08 Mar 2006 14:31:53 GMT
    [ http://issues.apache.org/jira/browse/DERBY-947?page=comments#action_12369454 ] 

Knut Anders Hatlen commented on DERBY-947:

Hi Francois,

Your code changes look very good, but I have one comment to the test

+            if (SQLState.ALREADY_CLOSED.equals(sqle.getSQLState()) ||
+                stmtIsClosed) {
+                // All is good and is expected

SQLState.ALREADY_CLOSED is "XJ012.S". However, it seems like
sqle.getSQLState() will return "XJ012". (EmbedSQLException invokes
StandardException.getSQLStateFromIdentifier, which performs
substring(0, 5) on the SQL state identifier.)

Would it make sense to replace SQLState.ALREADY_CLOSED with "XJ012"?
Alternatively, you could define a local constant

    final String ALREADY_CLOSED =
        SQLState.ALREADY_CLOSED.substring(0, 5); // ugh!

> Miscellaneous PreparedStatement methods added by JDBC4
> ------------------------------------------------------
>          Key: DERBY-947
>          URL: http://issues.apache.org/jira/browse/DERBY-947
>      Project: Derby
>         Type: New Feature
>   Components: JDBC
>     Reporter: Rick Hillegas
>     Assignee: Francois Orsini
>      Fix For:
>  Attachments: DERBY-947-v1.diff, DERBY-947-v1.stat
> As described in the JDBC 4 spec sections 13.2 and 3.1.
> This involves building support for JDBC4 methods added to PreparedStatement and not addressed
by other JIRAs: isPoolable() and setPoolable().

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