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

Konrad Windszus edited comment on SLING-12026 at 11/24/23 6:51 PM:
-------------------------------------------------------------------

[~cziegeler] Isn't 
[https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
 a nearest wins semantics, i.e. if the directly implemented interface is not 
marked as provider type it is assumed to be a consumer type (i.e. the default) 
and the same for direct super classes which should overwrite the provider role 
of any transitive super or interface class?

Update: I just verified with bnd that it is a nearest wins strategy, so a 
consumer type (even no annotation, i.e. just the default) wins over a 
transitive provider type.


was (Author: kwin):
[~cziegeler] Isn't 
[https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
 a nearest wins semantic, i.e. if the directly implemented interface is not 
marked as provider type it is assumed to be a consumer type (i.e. the default) 
and the same for direct super classes which should overwrite the provider role 
of any transitive super or interface class?

> Check for implementation/extension of provider types
> ----------------------------------------------------
>
>                 Key: SLING-12026
>                 URL: https://issues.apache.org/jira/browse/SLING-12026
>             Project: Sling
>          Issue Type: New Feature
>          Components: Feature Model Analyser
>    Affects Versions: Feature Model Analyser 2.0.0
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> OSGi distinguishes between 
> [consumer|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ConsumerType.html]
>  and 
> [provider|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
>  types (either interfaces or classes).
> Some bundles/features are only supposed to implement/extend consumer types in 
> order to be more stable against API changes. There should be a feature model 
> analyser enforcing this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to