You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2016/03/15 12:21:33 UTC
[jira] [Commented] (SLING-5607) SlingServletResolver.resolveServlet
should never return null
[ https://issues.apache.org/jira/browse/SLING-5607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15195116#comment-15195116 ]
Konrad Windszus commented on SLING-5607:
----------------------------------------
Changing the implementation for the methods {{resolveServlet(Resource, String)}} and {{resolveServlet(ResourceResolver, scriptName)}} (https://github.com/apache/sling/blob/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java#L277) is IMHO dangerous, as the chance of getting null back in the past was quite high (as there is no fallback on the default servlet).
[~cziegeler] WDYT?
> SlingServletResolver.resolveServlet should never return null
> ------------------------------------------------------------
>
> Key: SLING-5607
> URL: https://issues.apache.org/jira/browse/SLING-5607
> Project: Sling
> Issue Type: Improvement
> Components: Servlets
> Affects Versions: Servlets Resolver 2.4.2
> Reporter: Konrad Windszus
>
> According to the javadoc of the {{ServletResolver}} all resolve methods should never return {{null}} in case no servlet could be found but rather throw an exception.
> This issue was revealed in the context of SLING-5605.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)