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

OsgiCamelContextPublisher might leak Service-References

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.21.0
    • Component/s: osgi
    • Labels:
      None

      Description

      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

      Iterator<ServiceRegistration<?>> it = registrations.values().iterator();
          	while (it.hasNext()) {
      			it.next().unregister();
      			it.remove();
      		}
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              laeubi Christoph Läubrich
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: