Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7184

Double checked locking in PolicyEngineImpl.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 3.1.8, 3.1.10, 3.0.13, 3.2.0
    • Invalid
    • JAX-WS Runtime
    • None
    • Unknown

    Description

      Method createEndpointPolicyInfo() in rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java contains a classic instance of the double checked locking pattern, which may cause an object to become visible to a different thread in a partially initialized state.

      Please see The "Double-Checked Locking is Broken" Declaration (https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html) to understand why this happens. A quick Google search should return several possible solutions.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            wevers Wil Evers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: