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

Konrad Windszus edited comment on SLING-6249 at 11/8/16 1:49 PM:
-----------------------------------------------------------------

[^SLING-6249-API-v01.patch] contains a proposal for the new constant class to 
be added to the Sling API. I tried to fix some mistakes in the javadoc and 
clarify even further.
[~cziegeler] Can you have a look?

I also noticed that in 
https://sling.apache.org/documentation/the-sling-engine/servlets.html#servlet-registration
 we have several mistakes. 

# It says for {{sling.servlet.resourceTypes}}
bq. This property is ignored if the sling.servlet.paths property is set.
This is contradicting both the javadoc of the according constant as well as the 
implementation because the servlet is actually registered using both mechanisms 
path and resource type in that case. 
# Related to the point above it states for multiple properties
bq. This property is ignored if the sling.servlet.paths property is set.
Rather it must say: This property is only considered for the registration with 
{{sling.servlet.resourceTypes}}.
# For {{sling.servlet.methods}} it incorrectly states
bq. If this property is missing, the value defaults to GET, regardless of which 
methods are actually implemented/handled by the servlet.
This is also not correct because the default methods are both GET and HEAD.


was (Author: kwin):
!SLING-6249-API-v01.patch! contains a proposal for the new constant class to be 
added to the Sling API. I tried to fix some mistakes in the javadoc and clarify 
even further.
[~cziegeler] Can you have a look?

I also noticed that in 
https://sling.apache.org/documentation/the-sling-engine/servlets.html#servlet-registration
 we have several mistakes. 

# It says for {{sling.servlet.resourceTypes}}
bq. This property is ignored if the sling.servlet.paths property is set.
This is contradicting both the javadoc of the according constant as well as the 
implementation because the servlet is actually registered using both mechanisms 
path and resource type in that case. 
# Related to the point above it states for multiple properties
bq. This property is ignored if the sling.servlet.paths property is set.
Rather it must say: This property is only considered for the registration with 
{{sling.servlet.resourceTypes}}.
# For {{sling.servlet.methods}} it incorrectly states
bq. If this property is missing, the value defaults to GET, regardless of which 
methods are actually implemented/handled by the servlet.
This is also not correct because the default methods are both GET and HEAD.

> Move ServletResolverConstants to an exported package
> ----------------------------------------------------
>
>                 Key: SLING-6249
>                 URL: https://issues.apache.org/jira/browse/SLING-6249
>             Project: Sling
>          Issue Type: Improvement
>    Affects Versions: Servlets Resolver 2.4.6
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>         Attachments: SLING-6249-API-v01.patch
>
>
> The constants being defined in 
> {{o.a.s.servlets.resolver.internal.ServletResolverConstants}} are not only 
> useful for the servlet resolver bundle itself but basically for every Sling 
> Servlet being defined without the custom Felix SCR annotations. Therefore it 
> would be good to move that to a package which is exported (and therefore part 
> of the public API). Although in reality all constant Strings are inline in 
> Java (which means that there should never be a runtime dependency towards 
> that class) it does not even appear in 
> http://sling.apache.org/apidocs/sling7/ nor in 
> https://sling.apache.org/apidocs/sling7/constant-values.html. Also the 
> constants are not part of the uber-jar being generated for the Sling API as 
> well for AEM 
> (https://docs.adobe.com/docs/en/aem/6-1/develop/dev-tools/ht-projects-maven.html#What%20is%20the%20UberJar?).
> This was first requested in 
> http://www.mail-archive.com/dev@sling.apache.org/msg45467.html and became 
> more important with the advent of OSGi 6 component annotations (see also 
> FELIX-5396).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to