[ 
https://issues.apache.org/jira/browse/SLING-4314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger resolved SLING-4314.
--------------------------------------
    Resolution: Fixed
      Assignee: Felix Meschberger

Thanks for providing the patch. I have applied it slightly modified in Rev. 
1652415.

The modification is to directly throw NoSuchMethodException from findMethod 
instead of first return null, then checking null and then throwing.

> The implementation of RenderContext#resolveProperty can be slow for certain 
> cases
> ---------------------------------------------------------------------------------
>
>                 Key: SLING-4314
>                 URL: https://issues.apache.org/jira/browse/SLING-4314
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Radu Cotescu
>            Assignee: Felix Meschberger
>             Fix For: Scripting Sightly Engine 1.0.0
>
>         Attachments: 
> SLING-4314_-_The_implementation_of_RenderContext_resolveProperty_can_be_slow_for_certain.patch
>
>
> The current implementation of 
> {{org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl#resolveProperty}}
>  is slow when the resolved methods of an object return {{null}} due to the 
> fact that {{getField}} is called without a real reason.
> Instead, {{getField}} should be called only when a method is not found.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to