joerghoh commented on code in PR #202:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/202#discussion_r2310408009


##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathHandler.java:
##########
@@ -121,7 +121,28 @@ public Map<String, List<String>> getVanityPathMappings() {
      * been null-ed.
      */
     protected void initializeVanityPaths() {
+
         this.initializing.lock();
+
+        // already disposed?
+        if (this.factory == null) {
+            log.error("Can't initialize vanity paths when 
MapConfigurationProvider is null");
+            return;
+        }
+
+        log.info(
+                "Initializing Vanity Paths ({}={}, {}={}, {}={}, {}={}, 
{}={})",
+                "enable_vanitypath",
+                this.factory.isVanityPathEnabled(),
+                "vanitypath_cache_in_background",
+                this.factory.isVanityPathCacheInitInBackground(),
+                "vanitypath_maxEntries",
+                this.factory.getMaxCachedVanityPathEntries(),
+                "vanitypath_(allowlist/denylist)",
+                this.factory.getVanityPathConfig(),
+                "vanitypath_bloomfilter_maxBytes",
+                this.factory.getVanityBloomFilterMaxBytes());

Review Comment:
   ```suggestion
                   "enable_vanitypath", this.factory.isVanityPathEnabled(),
                   "vanitypath_cache_in_background", 
this.factory.isVanityPathCacheInitInBackground(),
                   "vanitypath_maxEntries", 
this.factory.getMaxCachedVanityPathEntries(),
                   "vanitypath_(allowlist/denylist)", 
this.factory.getVanityPathConfig(),
                   "vanitypath_bloomfilter_maxBytes", 
this.factory.getVanityBloomFilterMaxBytes());
   ```



##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java:
##########
@@ -131,12 +131,22 @@ protected void initializeAliases() {
         // the map here
         this.aliasMapsMap = UNITIALIZED_MAP;
 
-        try {
-            // already disposed?
-            if (this.factory == null) {
-                return;
-            }
+        // already disposed?
+        if (this.factory == null) {
+            log.error("Can't initialize aliases when MapConfigurationProvider 
is null");
+            return;
+        }
 
+        log.info(
+                "Initializing Aliases ({}={}, {}={}, {}={})",
+                "alias_cache_in_background",
+                this.factory.isAliasCacheInitInBackground(),
+                "optimize_alias_resolution",
+                this.factory.isOptimizeAliasResolutionEnabled(),
+                "allowed_alias_locations",
+                this.factory.getAllowedAliasLocations());

Review Comment:
   ```suggestion
                   "alias_cache_in_background", 
this.factory.isAliasCacheInitInBackground(),
                   "optimize_alias_resolution", 
this.factory.isOptimizeAliasResolutionEnabled(),
                   "allowed_alias_locations", 
this.factory.getAllowedAliasLocations());
   ```
   



-- 
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