[ 
https://issues.apache.org/jira/browse/CAMEL-11876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-11876.
---------------------------------
    Resolution: Fixed

> OsgiCamelContextPublisher might leak Service-References
> -------------------------------------------------------
>
>                 Key: CAMEL-11876
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11876
>             Project: Camel
>          Issue Type: Bug
>          Components: osgi
>            Reporter: Christoph Läubrich
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.21.0
>
>
> OsgiCamelContextPublisher holds a Map of Service-References in its doShutdown 
> method this map is cleared.
> This could lead to problem when there are still items in the map.
> Instead of clearing the map, it should be iterate+remove
> {code:java}
> Iterator<ServiceRegistration<?>> it = registrations.values().iterator();
>       while (it.hasNext()) {
>                       it.next().unregister();
>                       it.remove();
>               }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to