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-unsubscr...@sling.apache.org

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

Reply via email to