Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6178

org.osgi.framework.Bundle#getServicesInUse returns services with usage count = 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • framework-6.0.3
    • framework-6.0.4
    • Framework
    • None
    • Patch

    Description

      org.osgi.framework.Bundle#getServicesInUse ultimately using org.apache.felix.framework.ServiceRegistry#getServicesInUse, which doesn't take into account usage count of the service references it has. 

      In result, the array of services returned contains services with usage count == 0, i.e. no longer used services.

      see services_in_use.diff which contains a fix and a test for it.

      Note that I had to modify dependency management to avoid problems with conflicting versions of hamcrest between junit and mockito.

      Attachments

        1. services_in_use.diff
          5 kB
          Renat Sabitov

        Issue Links

          Activity

            People

              karlpauls Karl Pauls
              rsabitov Renat Sabitov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: