You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Vlad Bailescu (JIRA)" <ji...@apache.org> on 2015/08/19 10:18:45 UTC
[jira] [Created] (SLING-4957) Sightly RenderContextImpl contains
utility methods that don't belong there
Vlad Bailescu created SLING-4957:
------------------------------------
Summary: Sightly RenderContextImpl contains utility methods that don't belong there
Key: SLING-4957
URL: https://issues.apache.org/jira/browse/SLING-4957
Project: Sling
Issue Type: Improvement
Components: Scripting
Affects Versions: Scripting Sightly Engine 1.0.2
Reporter: Vlad Bailescu
Priority: Minor
Fix For: Scripting Sightly Engine 1.0.4
The current implementation of Sightly's {{RenderContext}} contains a lot of of utility methods ([example|https://github.com/apache/sling/blob/90d2ed9e42deb144a7f6e1610871e72726cd810a/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/runtime/RenderContextImpl.java#L142]).
These are not related to the actual context and belong to an utility class. They are also unrelated to a specific instance/state and should be made static.
Refactoring these out of {{RenderContextImpl}} will allow us to avoid unnecessarily passing an object of this class to other parts of the code just to use these utility methods ([example|https://github.com/apache/sling/blob/90d2ed9e42deb144a7f6e1610871e72726cd810a/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/compiler/expression/node/BinaryOperator.java#L31]).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)