You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/10/27 07:21:59 UTC
[sling-org-apache-sling-api] branch master updated: SLING-9850
clarify null annotations for ResourceResolver.map(...) (#35)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-api.git
The following commit(s) were added to refs/heads/master by this push:
new f275c99 SLING-9850 clarify null annotations for ResourceResolver.map(...) (#35)
f275c99 is described below
commit f275c9998bf1bf406086cb65d585084240afabc9
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Oct 27 09:21:54 2021 +0200
SLING-9850 clarify null annotations for ResourceResolver.map(...) (#35)
---
src/main/java/org/apache/sling/api/resource/ResourceResolver.java | 6 +++---
src/main/java/org/apache/sling/api/resource/package-info.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/api/resource/ResourceResolver.java b/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
index 2b4e375..372ec13 100644
--- a/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
+++ b/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
@@ -292,7 +292,7 @@ public interface ResourceResolver extends Adaptable, Closeable {
* be resolved via {@link #resolve(String)}.
*
* @param resourcePath The path for which to return a mapped path.
- * @return The mapped path.
+ * @return The mapped path or {@code resourcePath} in case no mapping is found.
* @throws IllegalStateException if this resource resolver has already been
* {@link #close() closed}.
*
@@ -329,7 +329,7 @@ public interface ResourceResolver extends Adaptable, Closeable {
* @param request The http servlet request object which may be used to apply
* more mapping functionality.
* @param resourcePath The path for which to return a mapped path.
- * @return The mapped URL.
+ * @return The mapped URL or {@code resourcePath} in case no mapping is found.
* @throws IllegalStateException if this resource resolver has already been
* {@link #close() closed}.
* @since 2.0.4 (Sling API Bundle 2.0.4)
@@ -338,7 +338,7 @@ public interface ResourceResolver extends Adaptable, Closeable {
* @see <a href="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-Encoding</a>
* @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
*/
- @Nullable String map(@NotNull HttpServletRequest request, @NotNull String resourcePath);
+ @NotNull String map(@NotNull HttpServletRequest request, @NotNull String resourcePath);
/**
* Returns a {@link Resource} object for data located at the given path.
diff --git a/src/main/java/org/apache/sling/api/resource/package-info.java b/src/main/java/org/apache/sling/api/resource/package-info.java
index 7bd85e6..2c8f5ae 100644
--- a/src/main/java/org/apache/sling/api/resource/package-info.java
+++ b/src/main/java/org/apache/sling/api/resource/package-info.java
@@ -17,7 +17,7 @@
* under the License.
*/
-@Version("2.12.2")
+@Version("2.12.3")
package org.apache.sling.api.resource;
import org.osgi.annotation.versioning.Version;