This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/clarify-request-path-info-for-non-existing-resources in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-api.git
commit aca0aa7de49705f2a1339eff8a8b5814908b84e8 Author: Konrad Windszus <[email protected]> AuthorDate: Mon Oct 27 18:24:14 2025 +0100 SLING-12978 Clarify javadoc for RequestPathInfo for non existing resources --- .../org/apache/sling/api/request/RequestPathInfo.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/sling/api/request/RequestPathInfo.java b/src/main/java/org/apache/sling/api/request/RequestPathInfo.java index e1bece1..e29bc09 100644 --- a/src/main/java/org/apache/sling/api/request/RequestPathInfo.java +++ b/src/main/java/org/apache/sling/api/request/RequestPathInfo.java @@ -30,11 +30,13 @@ import org.osgi.annotation.versioning.ProviderType; * <p id="decomp"> * <b>Decomposition of a Request URL</b> * <ol> - * <li>{@link #getResourcePath() content path} - The longest substring of the request + * <li>{@link #getResourcePath() resource path} - The longest substring of the request * URI resolving to a {@link org.apache.sling.api.resource.Resource} object such - * that the content path is either the complete request URI or the next - * character in the request URI after the content path is either a dot (<code>.</code>) + * that the resource path is either the complete request URI or the next + * character in the request URI after the resource path is either a dot (<code>.</code>) * or a slash (<code>/</code>). + * In case the request URI does not resolve a Sling resource this contains the + * <strong>full request URI</strong> (including extensions, selectors and suffix if existing). * <li>{@link #getSelectors() selectors} - If the first character in the * request URI after the content path is a dot, the string after the dot upto * but not including the last dot before the next slash character or the end of @@ -60,7 +62,7 @@ import org.osgi.annotation.versioning.ProviderType; * <caption>URI decomposition</caption> * <tr> * <th>URI</th> - * <th>Content Path</th> + * <th>Resource Path</th> * <th>Selectors</th> * <th>Extension</th> * <th>Suffix</th> @@ -157,7 +159,8 @@ public interface RequestPathInfo { /** * Return the "resource path" part of the URL, what comes before selectors, * extension and suffix. This string is part of the request URL and need not - * be equal to the {@link org.apache.sling.api.resource.Resource#getPath()}. + * be equal to the {@link org.apache.sling.api.resource.Resource#getPath()} of the + * request bound resource (returned via {@link org.apache.sling.api.SlingJakartaHttpServletRequest#getResource()}). * Rather it is equal to the * {@link org.apache.sling.api.resource.ResourceMetadata#RESOLUTION_PATH resolution path metadata property} * of the resource. @@ -167,7 +170,7 @@ public interface RequestPathInfo { String getResourcePath(); /** - * Returns the extension from the URL or <code>null</code> if the request + * Returns the extension without the leading dot from the URL or <code>null</code> if the request * URL does not contain an extension. * <p> * Decomposition of the request URL is defined in the <a @@ -180,7 +183,8 @@ public interface RequestPathInfo { /** * Returns the selectors decoded from the request URL as string. Returns - * <code>null</code> if the request has no selectors. + * <code>null</code> if the request has no selectors. Never starts or ends + * with dots. * <p> * Decomposition of the request URL is defined in the <a * href="#decomp">Decomposition of a Request URL</a> above.
