Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-486

BeanHelper.setDefaultBeanFactory() is thread-hostile and not thread-safe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None

      Description

      BeanHelper.setDefaultBeanFactory() sets a private static field.

      This is thread-hostile, because different threads cannot safely use different factories.

      It's also not thread-safe, as the variable is not guaranteed to be published safely.
      Should either make the variable volatile, or synchronize both getter and setter.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sebb Sebb
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: