PicoContainer
  1. PicoContainer
  2. PICO-277

Starting components using OrderedComponentAdapterLifecycleManager should work on copy of list of adapters

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      If OrderedComponentAdapterLifecycleManager is used as the lifecycle manager it can crash if during the startup process more component adapters are added. The result is a java.util.ConcurrentModificationException.

      The line:
      adapters = orderedComponentAdapters;
      should be changed to:
      adapters = new ArrayList(orderedComponentAdapters);

      so that it will work on a copy of the list instead of the list itself.

        People

        • Assignee:
          Unassigned
          Reporter:
          Rickard ?berg
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated: