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

Carsten Ziegeler commented on SLING-2228:
-----------------------------------------

The patch looks good to me in general, however I see a potential problem in the 
facade, the methods check the delegate variable against null and if not null 
use it further on. If between the check and its usage, delegate is set to null, 
this would result in an NPE (unless i'm overseeing something)

> Prevent Reregistration of ScriptEngineManager on ScriptEngineFactory update
> ---------------------------------------------------------------------------
>
>                 Key: SLING-2228
>                 URL: https://issues.apache.org/jira/browse/SLING-2228
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.18
>            Reporter: Felix Meschberger
>         Attachments: SLING-2228.patch
>
>
> The ScriptEngineManager must be recreated when an existing 
> ScriptEngineFactory is removed or updated. This causes the 
> ScriptEngineManager service to be unregistered and registered again.
> We should probably prevent this, maybe along these lines:
>   * Register the ScriptEngineManager as a service during the whole lifetime 
> of the Scripting Core
>   * The registered ScriptEngineManager is a proxy to the actual 
> ScriptEngineManager which gets ScriptEngineFactory registered
>   * On ScriptEngineFactory update, the proxied ScriptEngineManager is just 
> replaced

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to