You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2015/01/16 17:18:34 UTC
[jira] [Reopened] (SLING-4314) The implementation of
RenderContext#resolveProperty can be slow for certain cases
[ https://issues.apache.org/jira/browse/SLING-4314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Radu Cotescu reopened SLING-4314:
---------------------------------
The slightly modified version of the patch that was applied in the end introduces a NPE in {{RenderContextImpl}} at line 338. This happens because {{findMethod}} can return {{null}}.
We have two options:
# make {{findMethod}} throw an exception if the method is not allowed to be used in Sightly
# perform the {{null}} check in {{getObjectNoArgMethod}}
> 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)