[jira] [Commented] (SLING-10124) OSGi Mock - Service reference order is not correct for Collection field injection

2021-03-08 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-10124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297706#comment-17297706
 ] 

Konrad Windszus commented on SLING-10124:
-

The OSGi spec for the order is at 
https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-reference.field.option

bq. Before the component instance is activated, SCR must set the field value 
with a new mutable collection that must contain the initial set of bound 
services sorted using the same ordering as ServiceReference.compareTo based 
upon service ranking and service id.

> OSGi Mock - Service reference order is not correct for Collection field 
> injection
> -
>
> Key: SLING-10124
> URL: https://issues.apache.org/jira/browse/SLING-10124
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing OSGi Mock 3.0.0
>Reporter: Roy Teeuwen
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.0
>
>
> If I look at the osgi mocks implementation to get back a list of service 
> references, I have the feeling that the order is wrong:
> https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/blob/ef6535bab69562ad3c2276dc84893fa2fab48438/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java#L295
> It states here that the order is the reverse order, but if I check in the 
> framework itself, the following comment would state the other order (which is 
> what I also experience when debugging in a live instance) :
> https://github.com/apache/felix-dev/blob/c562829a9ffd40af2f165a8b4763b4d6759f3c0f/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java#L688



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10124) OSGi Mock - Service reference order is not correct for Collection field injection

2021-03-08 Thread Roy Teeuwen (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-10124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297316#comment-17297316
 ] 

Roy Teeuwen commented on SLING-10124:
-

Super, thanks for the further digging into the actual OSGi spec! 

> OSGi Mock - Service reference order is not correct for Collection field 
> injection
> -
>
> Key: SLING-10124
> URL: https://issues.apache.org/jira/browse/SLING-10124
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing OSGi Mock 3.0.0
>Reporter: Roy Teeuwen
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.0
>
>
> If I look at the osgi mocks implementation to get back a list of service 
> references, I have the feeling that the order is wrong:
> https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/blob/ef6535bab69562ad3c2276dc84893fa2fab48438/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java#L295
> It states here that the order is the reverse order, but if I check in the 
> framework itself, the following comment would state the other order (which is 
> what I also experience when debugging in a live instance) :
> https://github.com/apache/felix-dev/blob/c562829a9ffd40af2f165a8b4763b4d6759f3c0f/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java#L688



--
This message was sent by Atlassian Jira
(v8.3.4#803005)