You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2016/03/15 10:52:33 UTC

[jira] [Comment Edited] (SLING-5605) Wrong null annotations on ServletResolver interface

    [ https://issues.apache.org/jira/browse/SLING-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15195018#comment-15195018 ] 

Carsten Ziegeler edited comment on SLING-5605 at 3/15/16 9:52 AM:
------------------------------------------------------------------

Shouldn't there always be a default servlet? I think the implementation is actually wrong as it returns null if the default servlet can't be get. It should throw
The javadoc is correct, it states to throw the exception if the servlet can't be get

cc [~kwin]



was (Author: cziegeler):
Shouldn't there always be a default servlet?

> Wrong null annotations on ServletResolver interface
> ---------------------------------------------------
>
>                 Key: SLING-5605
>                 URL: https://issues.apache.org/jira/browse/SLING-5605
>             Project: Sling
>          Issue Type: Bug
>          Components: API
>    Affects Versions: API 2.11.0
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>
> Currently all methods being defined on {{org.apache.sling.api.servlets}} are carrying the {{@Nonnull}} annotation (https://github.com/apache/sling/blob/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java). According to the implementation this is wrong and all three may return {{null}} in case there was no appropriate servlet found.
> The javadoc as well as the null annotations should be adjusted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)