[
https://issues.apache.org/jira/browse/DERBY-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974384#action_12974384
]
Knut Anders Hatlen commented on DERBY-4869:
-------------------------------------------
In the last patch, NetResultSet40 preserves the ClassCastException whereas
EmbedResultSet40 doesn't. Any reason for this difference?
The following code...
+ Object result = getObject( columnIndex );
+ if ( !type.isInstance( result ) ) { throw new
ClassCastException( type.getName() ); }
+ return (T) result;
...could be simplified to:
return type.cast(getObject(columnIndex));
The latter variant will also give a clearer error message (example: "Cannot
cast java.lang.Boolean to java.lang.Integer" vs just "java.lang.Integer").
> 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, disable-tests.diff,
> JDBC_4.1_Changes.html
>
>
> 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.