This is an automated email from the ASF dual-hosted git repository.

joerghoh pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git


The following commit(s) were added to refs/heads/master by this push:
     new 42d3c67  log something in case the vanity path initializer fails (#116)
42d3c67 is described below

commit 42d3c670b90d5034a3e465881e17ae1cbf4fc831
Author: Jörg Hoh <[email protected]>
AuthorDate: Thu Jul 18 12:47:07 2024 +0200

    log something in case the vanity path initializer fails (#116)
---
 .../apache/sling/resourceresolver/impl/mapping/MapEntries.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java 
b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
index 168faeb..def8167 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
@@ -304,8 +304,12 @@ public class MapEntries implements
 
         @Override
         public void run() {
-            temporaryResolveMapsMap = Collections.synchronizedMap(new 
LRUMap<>(SIZELIMIT));
-            execute();
+            try {
+                temporaryResolveMapsMap = Collections.synchronizedMap(new 
LRUMap<>(SIZELIMIT));
+                execute();
+            } catch (Throwable t) {
+                log.error("vanity path initializer thread terminated with a 
throwable", t);
+            }
         }
 
         private void drainQueue(List<Map.Entry<String, 
ResourceChange.ChangeType>> queue) {

Reply via email to