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

Felix Meschberger reopened SLING-3320:
--------------------------------------

      Assignee: Felix Meschberger

This change has a problem in the removedService(ServiceReference) method: The 
genericBindingsValuesProviders now uses a ServiceReference as the key while the 
removedService method still assumes the service ID this causes a 
ClassCastException:

{noformat}
java.lang.ClassCastException: 
org.apache.felix.framework.ServiceRegistrationImpl$ServiceReferenceImpl cannot 
be cast to java.lang.Long
        at java.lang.Long.compareTo(Long.java:50)
        at 
java.util.concurrent.ConcurrentSkipListMap.doRemove(ConcurrentSkipListMap.java:1064)
        at 
java.util.concurrent.ConcurrentSkipListMap.remove(ConcurrentSkipListMap.java:1659)
        at 
org.apache.sling.scripting.core.impl.ContextBvpCollector.removedService(ContextBvpCollector.java:99)
        at 
org.apache.sling.scripting.core.impl.BindingsValuesProvidersByContextImpl$3.applyInContext(BindingsValuesProvidersByContextImpl.java:217)
{noformat}

> Use service ranking to sort BindingsValuesProvider services
> -----------------------------------------------------------
>
>                 Key: SLING-3320
>                 URL: https://issues.apache.org/jira/browse/SLING-3320
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.24
>            Reporter: Feike Visser
>            Assignee: Felix Meschberger
>             Fix For: Scripting Core 2.0.26
>
>         Attachments: SLING-3320_1.diff
>
>
> I have implemented two basic BindingsValuesProviders like this.
> {code}
> @Service
> @Component(immediate=true)
> public class MyBindings implements BindingsValuesProvider {
> }
> {code}
> What I want to make sure is that they are *always* executed in the same 
> order, first A, then B.
> Because I want to re-use objects that were set in the first 
> BindingsValuesProvider.
> Currently I don't have a way to do this.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to