[
https://issues.apache.org/jira/browse/SLING-4352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14934968#comment-14934968
]
Carsten Ziegeler commented on SLING-4352:
-----------------------------------------
I think nowadays the overhead of reflection/proxy are nearly not noticible, in
addition this resource resolver should only be used on first access of a
servlet (like for the jsp compilation), from that one it should not be used
anymore. So I think we can ignore performance considerations.
Even if we go with adding the wrapper to the servlet api as well, we can't get
rid of it. As soon as we would we are again tied to the latest Sling API. And
we don't really have a need for the wrapper in general.
> The ResourceResolver passed to SlingScripts should not be closeable
> -------------------------------------------------------------------
>
> Key: SLING-4352
> URL: https://issues.apache.org/jira/browse/SLING-4352
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Reporter: Radu Cotescu
> Assignee: Carsten Ziegeler
> Fix For: Servlets Resolver 2.3.8
>
>
> The {{SlingServletResolver}} uses an administrative resource resolver
> ({{sharedScriptResolver}}) for script resolution. This same resolver is
> passed to SlingScripts when a resource is adapted to a {{SlingScript}} in
> {{SlingServletResolver#findScript}} (see
> {{SlingScriptAdapterFactory#getAdapter}}).
> Since this resolver is made available to scripts in the {{ScriptContext}}
> (see the implementation of {{DefaultSlingScript#call}}), the resolver should
> be protected against accidental closing from downstream callers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)