[ 
https://issues.apache.org/jira/browse/DERBY-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980000#action_12980000
 ] 

Knut Anders Hatlen commented on DERBY-4869:
-------------------------------------------

The null-handling patch looks fine to me. Thanks, Rick!

Two tiny nits:

- In the catch-all case where we call getObject(int), we now have a redundant 
call to Class.cast()

- Since there's only one place where we do a cast now, the try/catch that 
ignores ClassCastException could be narrowed down to enclose that single line 
only. And probably a little comment explaining why we ignore the exception is 
in order. Alternatively, the intention of the code may be clearer if we remove 
the try/catch altogether and instead do an explicit check, something like

    if (retval == null || type.isInstance(retval)) {
        return type.cast(retval);
    }

> Implement JDBC 4.1, the api increment introduced by Java 7
> ----------------------------------------------------------
>
>                 Key: DERBY-4869
>                 URL: https://issues.apache.org/jira/browse/DERBY-4869
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>            Reporter: Rick Hillegas
>         Attachments: derby-4869-01-ac-rs-getObject.diff, 
> derby-4869-01-ad-rs-getObject.diff, derby-4869-02-aa-cs-ps-addBatch.diff, 
> derby-4869-02-ab-cs-ps-addBatch.diff, 
> derby-4869-03-aa-rs-getObject-errorCleanup.diff, 
> derby-4869-04-aa-rs-getObject-simplification.diff, 
> derby-4869-05-aa-rs-getObject-exception.diff, 
> derby-4869-06-aa-cs-getObject.diff, derby-4869-06-ab-cs-getObject.diff, 
> derby-4869-07-aa-timedisplacement.diff, derby-4869-08-ac-nullHandling.diff, 
> disable-tests.diff, JDBC_4.1_Changes.html, timezone.diff
>
>
> This is a master issue logged to track our work implementing JDBC 4.1, the 
> changes to the java.sql and javax.sql packages introduced by Java 7.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to