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

NPE in MultiplePrototypeRefPair.unsetServiceObject

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • scr-2.1.14
    • None
    • Mac OS X 10.14

    Description

      I use Felix with the eclipse runtime (Photon 0918), and I get a NPE when running my application. 

       

      Actually in the code of 

      MultiplePrototypeRefPair.unsetServiceObject we have :  instances.get(key). 

      If we search for the callers, the DependencyManager class call It like this : 

       

             protected void ungetService(RefPair<S, T> ref)

              {

                  Object service = ref.unsetServiceObject(null);

                  if (service != null)

       

      Unfortunately, the instances map is a ConcurentHashMap which can not deal with null keys (it calls key.hashcode at the beginning), and this call will always raise an exception... 

      Don't know what is the Felix version involved, but the bundle I use in my launch configuration is  (org.apache.felix.scr 2.0.14.v20180117)

       

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            olivierprouvost Olivier Prouvost
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: