Derby
  1. Derby
  2. DERBY-4124

Broken double-checked-locking in EmbeddedDataSource.findDriver

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.4.2.0
    • Fix Version/s: 10.6.1.0
    • Component/s: JDBC
    • Labels:
      None
    • Environment:
      all
    • Urgency:
      Normal

      Description

      org.apache.derby.jdbc.EmbeddedDataSource.findDriver() uses the
      double-checked-locking idiom for setting the 'driver' variable. This
      idiom is, however, not correct and hence the code is broken. The fix
      is to remove the outer if, i.e. to always enter the synchronized block.

      See also
      http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Bryan Pendleton
            Reporter:
            Ronald Tschalaer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development