You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2023/01/11 13:02:26 UTC

[GitHub] [sling-org-apache-sling-resourceresolver] cristic83 commented on a diff in pull request #89: [SLING-11742] Provide alternative equitable terminology for properties

cristic83 commented on code in PR #89:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/89#discussion_r1066964951


##########
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java:
##########
@@ -79,6 +81,45 @@ private static final class FactoryRegistration {
         public volatile CommonResourceResolverFactoryImpl commonFactory;
     }
 
+    private static final class VanityPathConfigurer {
+        private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+        void configureVanityPathPrefixes(String[] pathPrefixes, String[] pathPrefixesFallback,

Review Comment:
   I attempted to implement this suggestion and the result looks like below. I don't think it's all that nicer,what do you think?
   `void configureVanityPAthPrefix(ResourceResolverFactoryConfig config, Consumer<String[]> allowVanityPathConsumer,  
                                      Consumer<String[]> denyVanityPathConsumer) {
           configureVanityPathPrefixes(config.resource_resolver_vanitypath_whitelist(),
               config.resource_resolver_vanitypath_allowlist(),
               "resource_resolver_vanitypath_whitelist",
               "resource_resolver_vanitypath_allowlist",
               allowVanityPathConsumer);
           configureVanityPathPrefixes(config.resource_resolver_vanitypath_blacklist(),
               config.resource_resolver_vanitypath_denylist(),
               "resource_resolver_vanitypath_blacklist",
               "resource_resolver_vanitypath_denylist",
               denyVanityPathConsumer);
       }`
       



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org