You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2016/03/15 14:25:47 UTC
svn commit: r1735072 - in
/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets:
ServletResolver.java package-info.java
Author: cziegeler
Date: Tue Mar 15 13:25:41 2016
New Revision: 1735072
URL: http://svn.apache.org/viewvc?rev=1735072&view=rev
Log:
SLING-5605 : Wrong null annotations on ServletResolver interface
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/package-info.java
Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java?rev=1735072&r1=1735071&r2=1735072&view=diff
==============================================================================
--- sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java (original)
+++ sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java Tue Mar 15 13:25:41 2016
@@ -18,6 +18,7 @@
*/
package org.apache.sling.api.servlets;
+import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.servlet.Servlet;
@@ -57,13 +58,13 @@ public interface ServletResolver {
* @param request The {@link SlingHttpServletRequest} object used to drive
* selection of the servlet.
* @return The servlet whose <code>service</code> method may be called to
- * handle the request. Never {@code null}.
- * @throws org.apache.sling.api.SlingException Is thrown if an error occurrs
+ * handle the request. Might be {@code null}.
+ * @throws org.apache.sling.api.SlingException Is thrown if an error occurs
* while trying to find an appropriate servlet to handle the
- * request or if no servlet could be resolved to handle the
* request.
+ * @Throws NullPointerException If {@code request} is null.
*/
- @Nonnull Servlet resolveServlet(@Nonnull SlingHttpServletRequest request);
+ @CheckForNull Servlet resolveServlet(@Nonnull SlingHttpServletRequest request);
/**
* Resolves a <code>javax.servlet.Servlet</code> whose
@@ -77,21 +78,23 @@ public interface ServletResolver {
* request object available.
*
* Basically this method searches a script with the <code>scriptName</code>
- * for the resource type defined by the <code>resource</code>
+ * for the resource type defined by the <code>resource</code>.
+ *
* @param resource The {@link Resource} object used to drive
* selection of the servlet.
* @param scriptName The name of the script - the script might have an
* extension. In this case only a script with the
* matching extension is used.
* @return The servlet whose <code>service</code> method may be called to
- * handle the request. Never {@code null}.
- * @throws org.apache.sling.api.SlingException Is thrown if an error occurrs
+ * handle the request. Might be {@code null}.
+ * @throws org.apache.sling.api.SlingException Is thrown if an error occurs
* while trying to find an appropriate servlet to handle the
* request or if no servlet could be resolved to handle the
* request.
+ * @throws IllegalArgumentException If {@code resource} is null.
* @since 2.1 (Sling API Bundle 2.1.0)
*/
- @Nonnull Servlet resolveServlet(@Nonnull Resource resource, @Nonnull String scriptName);
+ @CheckForNull Servlet resolveServlet(@Nonnull Resource resource, @Nonnull String scriptName);
/**
* Resolves a <code>javax.servlet.Servlet</code> whose
@@ -111,13 +114,13 @@ public interface ServletResolver {
* extension. In this case only a script with the
* matching extension is used.
* @return The servlet whose <code>service</code> method may be called to
- * handle the request. Never {@code null}.
- * @throws org.apache.sling.api.SlingException Is thrown if an error occurrs
+ * handle the request. Might be {@code null}.
+ * @throws org.apache.sling.api.SlingException Is thrown if an error occurs
* while trying to find an appropriate servlet to handle the
- * request or if no servlet could be resolved to handle the
* request.
+ * @throws IllegalArgumentException If {@code resolver} is null.
* @since 2.1 (Sling API Bundle 2.1.0)
*/
- @Nonnull Servlet resolveServlet(@Nonnull ResourceResolver resolver, @Nonnull String scriptName);
+ @CheckForNull Servlet resolveServlet(@Nonnull ResourceResolver resolver, @Nonnull String scriptName);
}
Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/package-info.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/package-info.java?rev=1735072&r1=1735071&r2=1735072&view=diff
==============================================================================
--- sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/package-info.java (original)
+++ sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/package-info.java Tue Mar 15 13:25:41 2016
@@ -17,7 +17,7 @@
* under the License.
*/
-@Version("2.1.1")
+@Version("2.1.2")
package org.apache.sling.api.servlets;
import aQute.bnd.annotation.Version;