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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: