sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Windszus <konra...@gmx.de>
Subject Re: [VOTE] Release Apache Sling Content Parser API 2.0.0, Apache Sling Content Parser JSON 2.0.0, Apache Sling Content Parser XML 2.0.0, Apache Sling Content Parser XML JCR 2.0.0, Apache Sling Content Parser Test Utilities 2.0.0
Date Wed, 24 Jul 2019 16:44:26 GMT
IMHO  it is the other way around: If only few/one bundle are supposed to implement the interface
rather annotate with ProviderType (compare with https://osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html
<https://osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html>
and https://github.com/apache/sling-org-apache-sling-contentparser-api/blob/master/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java
<https://github.com/apache/sling-org-apache-sling-contentparser-api/blob/master/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java>).
But I don't think it does matter for final classes as you anyhow cannot extend/implement them!
Konrad

> On 24. Jul 2019, at 18:40, Radu Cotescu <radu@apache.org> wrote:
> 
> Hi Stefan,
> 
>> On 24 Jul 2019, at 18:29, Stefan Seifert <sseifert@pro-vision.de> wrote:
>> 
>> p.s. i think the annotation in [1] should be @ProviderType, not @ConsumerType - but
i think this can be changed in future releases without breaking anything.
>> [1] https://github.com/apache/sling-org-apache-sling-contentparser-api/blob/master/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java
<https://github.com/apache/sling-org-apache-sling-contentparser-api/blob/master/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java>
> The class is not supposed to be implemented, so IMO this is a Consumer, right? The ConsumerType
is actually the default assumed by most OSGi plugins if I remember correctly, so annotating
this final class with ConsumerType was just a pedantic move on my part.
> 
> Cheers,
> Radu


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message