Hi,
Sorry, I just reviewed these changes 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/commit/26edac2f39ca2f61fc9aeeada61426b78ec8252c
 now, so I am a bit late. I do have a concern with using a generic service 
interface like java.util.function.predicate in OSGi because it is
a) very generic
b) uses generics :-)

a) leads to the fact that for example AEM already registers quite a lot of 
Predicate services already (so filtering may take a bit).
b) leads to the fact that one cannot easily see if a predicate is really 
suitable for a given type. I have seen predicates on Nodes and Strings. The one 
choosen for Sling uses String, while IMHO Resource would be the better target 
to filter on (as that would allow to also consider resource metadata apart from 
the path). Also the name `sling.servlet.resolver.resource.hiding` rather seems 
to indicate a Predicate on a Resource than a String.

I would actually prefer to come up with a dedicated (functional) interface for 
Resource predicates and define name values for different usage scenarios as 
constants of that interface (right now only being 
“sling.servlet.resolver.resource.hiding” for the servlet resolver use case).

WDYT?
Konrad



> On 10. Jul 2025, at 18:55, Bertrand Delacretaz <bdelacre...@apache.org> wrote:
> 
> Hi,
> 
> We solved 1 issue in this release:
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20SLING%20AND%20fixVersion%20%3D%20%22Servlets%20Resolver%202.11.10%22
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2976
> 
> You can use this UNIX script to download the release and verify the 
> signatures:
> https://raw.githubusercontent.com/apache/sling-tooling-release/master/check_staged_release.sh
> 
> Usage:
> sh check_staged_release.sh 2976 /tmp/sling-staging
> 
> Please vote to approve this release:
> 
>  [ ] +1 Approve the release
>  [ ]  0 Don't care
>  [ ] -1 Don't release, because ...
> 
> This majority vote is open for at least 72 hours.
> 
> Here's my +1
> 
> -Bertrand
> 

Reply via email to