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

Carsten Ziegeler resolved SLING-2468.
-------------------------------------

    Resolution: Fixed

Replaced the usage of the key class with ServiceReference
                
> Use ServiceReference to order adapter factories
> -----------------------------------------------
>
>                 Key: SLING-2468
>                 URL: https://issues.apache.org/jira/browse/SLING-2468
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Adapter 2.0.12
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Adapter 2.0.14
>
>
> On shutdown of a bundle an NPE might occur during unregistering an adapter 
> factory:
> java.lang.NullPointerException
>       at
> org.apache.sling.adapter.internal.AdapterFactoryDescriptorKey.<init>(AdapterFactoryDescriptorKey.java:43)
>       at
> org.apache.sling.adapter.internal.AdapterManagerImpl.unregisterAdapterFactory(AdapterManagerImpl.java:268)
>       at 
> The key is currently using bundle id and service id to register and order 
> factories. On shutdown of a bundle the bundle might not be available anymore 
> from the service reference, therefore the NPE occurs
> It would be better to use the ServiceReference to directly compare and order 
> factories. This would not only avoid the NPE but also give a stable ordering 
> based on the service ranking of factories.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to