Uploaded image for project: 'Commons Dbcp'
  1. Commons Dbcp
  2. DBCP-310

SQLNestedException & use of initCause() with SQLException

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3, 1.4
    • Labels:
      None

      Description

      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

           throw (SQLException )new SQLException(message).initCause(e)
      

      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.

        Attachments

        1. DBCP-310-v2.patch
          20 kB
          Niall Pemberton
        2. SQLNestedException.patch
          13 kB
          Niall Pemberton

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                niallp Niall Pemberton
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: