Skip to content

Concurrent modification exception in AbstractTopologyManager.close() #229

@scottslewis

Description

@scottslewis

Because of the fail-fast nature of the underlying maps and lists in the AbstractTopologyManager registrations field, when close() is called a concurrent modification exception will happen

RROR: Bundle org.eclipse.ecf.osgi.services.distribution [46] Error stopping file:/C:/Users/slewi/.m2/repository/org/eclipse/ecf/org.eclipse.ecf.osgi.services.distribution/2.2.0/org.eclipse.ecf.osgi.services.distribution-2.2.0.jar (org.osgi.framework.BundleException: Activator stop error in bundle org.eclipse.ecf.osgi.services.distribution [46].)
java.util.ConcurrentModificationException
at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1855)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.close(AbstractTopologyManager.java:118)
at org.eclipse.ecf.osgi.services.remoteserviceadmin.TopologyManager.deactivate(TopologyManager.java:327)
at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.deactivate(BasicTopologyManager.java:41)
at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.stop(BasicTopologyManager.java:36)
at org.eclipse.ecf.internal.osgi.services.distribution.Activator.stop(Activator.java:39)
at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:871)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2822)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1584)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:297)
at java.base/java.lang.Thread.run(Thread.java:833)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions