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

Konrad Windszus commented on SLING-7624:
----------------------------------------

AFAIK the weird property name {{sling.core.servletName}} prevents us from 
creating that from a single value annotation (with only one method named 
"value"). According to OSGi 7 Comp, 112.8.2.1 the mapping rules are as follows
{quote}
However, if the component property type is a single-element annotation, see 
9.7.3 in [7] The Java Language
Specification, Java SE 8 Edition, then the property name for the value method 
is derived from the
name of the component property type rather than the name of the method.
In this case, the simple name of the component property type, that is, the name 
of the class without
any package name or outer class name, if the component property type is an 
inner class, must be
converted to the property name as follows:
• When a lower case character is followed by an upper case character, a full 
stop ('.' \u002E) is inserted
between them.
• Each upper case character is converted to lower case.
• All other characters are unchanged.
• If the component property type declares a PREFIX_ field whose value is a 
compile-time constant
String, then the property name is prefixed with the value of the PREFIX_ field.
{quote}

I fail to see how to generate the property name {{sling.core.servletName}} with 
those rules (the main issue being the upper-case "N").

> Add OSGi7 component property annotations for Servlet and Filter
> ---------------------------------------------------------------
>
>                 Key: SLING-7624
>                 URL: https://issues.apache.org/jira/browse/SLING-7624
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> Previously there were annotations hosted at Felix for Sling Servlets/Filters 
> as custom Felix SCR annotations 
> (https://github.com/apache/felix/tree/trunk/tools/org.apache.felix.scr.annotations/src/main/java/org/apache/felix/scr/annotations/sling).
>  With OSGi R7 and DS 1.4 component property annotations are specified. Sling 
> should provide those annotations in a dedicated new artifact. Compare also 
> with FELIX-5396.
> Those are supported in the upcoming bnd 4.0 
> (https://github.com/bndtools/bnd/issues/2163).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to