sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <>
Subject [jira] Resolved: (SLING-15) NPE if the scripted component hasn't sling:scripts node created
Date Fri, 21 Sep 2007 20:12:51 GMT


Felix Meschberger resolved SLING-15.

       Resolution: Fixed
    Fix Version/s: 2.0.0

As we have a default script selection algorithm, I think, that it is ok that there is no scripts
child node. But the ScriptedComponent should of course be prepared to have nothing.

Therefore fixing ScriptingComponent as follows:
  - if setScripts is called with no scripts or an empty list, the field is set to null
  - if the field is null, getScript(ComponentRequest) immediately returns the default
  - if the field is null, getScripts returns an empty list

Please close, if this solves your issue (should actually :-) )

> NPE if the scripted component hasn't sling:scripts node created
> ---------------------------------------------------------------
>                 Key: SLING-15
>                 URL:
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Edgar Poce
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: 2.0.0
> if the ScriptedComponent node hasn't the child node "sling:scripts" the request for nodes
that refer to that scripted component can't be resolved, it throws NPE at ScriptedComponent:
148 because the variable scripts is not initialized.
> proposed fix: add "mandatory" and "autocreated" to sling:ScriptedComponent Nodetype definition.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message