You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/05/05 10:02:57 UTC
[jira] Resolved: (SLING-390) NPE in SlingServletResolver (script ==
null accessed)
[ https://issues.apache.org/jira/browse/SLING-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-390.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Fixed in Rev. 653340.
Please close, if this is ok for you. Thanks.
> NPE in SlingServletResolver (script == null accessed)
> -----------------------------------------------------
>
> Key: SLING-390
> URL: https://issues.apache.org/jira/browse/SLING-390
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Alexander Klimetschek
> Assignee: Felix Meschberger
> Priority: Critical
> Fix For: 2.0.0
>
>
> This warning popped up after I imported the trunk into Eclipse; it's in SlingServletResolver.findScript() at line 225 ff:
> SlingScript script = resource.adaptTo(SlingScript.class);
> if (script == null) {
> log.debug("findScript: Using script {} for {}",
> script.getScriptResource().getPath(), name);
> return script;
> }
> Inside the if block, script will be null, thus script.getScriptResource() will fail with an NPE and also returning script seems wrong here.
> I assume the condition should be if (script != null) instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.