This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch SLING-12648
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
The following commit(s) were added to refs/heads/SLING-12648 by this push:
new f365fc3 SLING-12648: MapEntries: factor out vanity path handling -
make resolveMapsMap final
f365fc3 is described below
commit f365fc39b6f930bc47e8bd089a66784871c5d490
Author: Julian Reschke <[email protected]>
AuthorDate: Mon Feb 10 15:36:49 2025 +0100
SLING-12648: MapEntries: factor out vanity path handling - make
resolveMapsMap final
---
.../org/apache/sling/resourceresolver/impl/mapping/MapEntries.java | 6 ++----
1 file changed, 2 insertions(+), 4 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 f225123..91a842c 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
@@ -120,7 +120,7 @@ public class MapEntries implements
private volatile ServiceRegistration<ResourceChangeListener> registration;
- private Map<String, List<MapEntry>> resolveMapsMap;
+ private final Map<String, List<MapEntry>> resolveMapsMap;
private List<Map.Entry<String, ResourceChange.ChangeType>>
resourceChangeQueue;
@@ -157,7 +157,7 @@ public class MapEntries implements
this.factory = factory;
this.eventAdmin = eventAdmin;
- this.resolveMapsMap = Collections.singletonMap(GLOBAL_LIST_KEY,
Collections.emptyList());
+ this.resolveMapsMap = new ConcurrentHashMap<>(Map.of(GLOBAL_LIST_KEY,
Collections.emptyList()));
this.mapMaps = Collections.<MapEntry> emptyList();
this.aliasMapsMap = new ConcurrentHashMap<>();
this.stringInterpolationProvider = stringInterpolationProvider;
@@ -250,8 +250,6 @@ public class MapEntries implements
}
}
- this.resolveMapsMap = new ConcurrentHashMap<>();
-
doUpdateConfiguration();
sendChangeEvent();