Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10812

FactoryFinder: make DefaultFactoryFinder and OsgiFactoryFinder thread safe

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.19.0
    • camel-core, camel-osgi
    • None
    • Unknown

    Description

      As today DefaultFactoryFinder (and so OsgiFactoryFinder) caches the classes using a ConcurrentMap but then it does not have any synchronization to prevent multiple instantiation for the same key.

      As camel requires java 8, we can use compiteIfAbsent to make it thread safe.

      Attachments

        Activity

          People

            lb Luca Burgazzoli
            lb Luca Burgazzoli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: