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

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

commit 6a926f6aa707949880b0b07b7eb298f9b2defc1a
Author: Julian Reschke <[email protected]>
AuthorDate: Mon Nov 10 16:42:15 2025 +0100

    SLING-12998: ResourceResolver: implement toString() on VanityPathConfig
---
 .../impl/mapping/MapConfigurationProvider.java                | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapConfigurationProvider.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapConfigurationProvider.java
index aab6e86b..8dee1658 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapConfigurationProvider.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapConfigurationProvider.java
@@ -29,7 +29,7 @@ import org.apache.sling.api.resource.path.Path;
 /**
  * Internal interface representing the additional methods
  * MapEntries needs from the ResourceResolverFactory.
- *
+ * <p>
  * Exists primarily to facilitate mocking of the ResourceResolverFactory
  * when testing MapEntries.
  */
@@ -65,7 +65,7 @@ public interface MapConfigurationProvider extends 
ResourceResolverFactory {
 
     Map<String, Object> getServiceUserAuthenticationInfo(final String 
subServiceName) throws LoginException;
 
-    public class VanityPathConfig implements Comparable<VanityPathConfig> {
+    class VanityPathConfig implements Comparable<VanityPathConfig> {
         public final boolean isExclude;
         public final String prefix;
 
@@ -76,7 +76,12 @@ public interface MapConfigurationProvider extends 
ResourceResolverFactory {
 
         @Override
         public int compareTo(VanityPathConfig o2) {
-            return 
Integer.valueOf(o2.prefix.length()).compareTo(this.prefix.length());
+            return Integer.compare(o2.prefix.length(), this.prefix.length());
+        }
+
+        @Override
+        public String toString() {
+            return (this.isExclude ? "deny " : "allow ") + "'" + this.prefix + 
"'";
         }
     }
 

Reply via email to