You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by re...@apache.org on 2025/02/06 19:02:07 UTC
(sling-org-apache-sling-resourceresolver) 01/02: SLING-12648: MapEntries: factor out vanity path handling - move vanityTargets
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
commit 6fd0fb569b7ba6ebab4e27447c3503f2f95e7ad6
Author: Julian Reschke <re...@apache.org>
AuthorDate: Thu Feb 6 19:37:51 2025 +0100
SLING-12648: MapEntries: factor out vanity path handling - move vanityTargets
---
.../resourceresolver/impl/mapping/VanityPathMapEntriesTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java
index 4be59a4..8905f0c 100644
--- a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java
+++ b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java
@@ -174,8 +174,11 @@ public class VanityPathMapEntriesTest extends AbstractMappingMapEntriesTest {
return (AtomicLong) vanityCounter.get(mapEntries.vph);
}
- private static Map<String, List<String>> getVanityTargets(MapEntries mapEntries) {
- return mapEntries.vph.getVanityPathMappings();
+ @SuppressWarnings("unchecked")
+ private static Map<String, List<String>> getVanityTargets(MapEntries mapEntries) throws NoSuchFieldException, IllegalAccessException {
+ Field field = MapEntries.VanityPathHandler.class.getDeclaredField("vanityTargets");
+ field.setAccessible(true);
+ return (Map<String, List<String>>) field.get(mapEntries.vph);
}
@SuppressWarnings("unchecked")