You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2009/11/28 19:19:20 UTC

[jira] Commented: (DBCP-310) SQLNestedException & use of initCause() with SQLException

    [ https://issues.apache.org/jira/browse/DBCP-310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783260#action_12783260 ] 

Mark Thomas commented on DBCP-310:
----------------------------------

I'd rather see the back of this completely as per DBCP-143. That means leaving it deprecated for now and removing it in a 2.0 release which is now more likely given that there is likely to be a pool 2.0. 

> SQLNestedException & use of initCause() with SQLException
> ---------------------------------------------------------
>
>                 Key: DBCP-310
>                 URL: https://issues.apache.org/jira/browse/DBCP-310
>             Project: Commons Dbcp
>          Issue Type: Improvement
>            Reporter: Niall Pemberton
>            Priority: Minor
>             Fix For: 1.3, 1.4
>
>         Attachments: SQLNestedException.patch
>
>
> SQLNestedException in its current state is a hangover from supporting JDK 1.3 when there was no "initCause()" method. This implementation can now be greatly simplified with DBCP now having a minimum of JDK 1.4
> Also SQLNestedException is deprecated and the following code has been used in a number of places
> {code}
>      throw (SQLException )new SQLException(message).initCause(e)
> {code}
> DBCP is inconsistent though - sometimes using the above and sometimes using SQLNestedException. IMO SQLNestedException  should be un-deprecated and used consistently everywhere - its now a simple implementation and I think the code is cleaner using it rather than the above.

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