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

FactoryFinder: make DefaultFactoryFinder and OsgiFactoryFinder thread safe

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.19.0
    • Component/s: camel-core, camel-osgi
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: