commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Commented: (DBCP-310) SQLNestedException & use of initCause() with SQLException
Date Sat, 28 Nov 2009 23:40:20 GMT


Phil Steitz commented on DBCP-310:

I guess I am OK with the backwards compatible change to SQLNestedException, but want to keep
the deprecation and not increase its use as we should remove it in 2.0.  Given that, its probably
not worth the effort.

Regarding your comments on API contract and breakage, I agree in principle, but  I can imagine
scenarios where your second bullet could lead to badness - exceptions propagating up the stack
when they could have been handled.  Your third bullet is valid, but not for a .x release that
we want to be a drop-in replacement.  So basically, I am still in agreement with your former
self on this ;)

> SQLNestedException & use of initCause() with SQLException
> ---------------------------------------------------------
>                 Key: DBCP-310
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Improvement
>            Reporter: Niall Pemberton
>            Priority: Minor
>             Fix For: 1.3, 1.4
>         Attachments: DBCP-310-v2.patch, 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.

View raw message