[
https://issues.apache.org/jira/browse/SLING-4957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14729135#comment-14729135
]
ASF GitHub Bot commented on SLING-4957:
---------------------------------------
GitHub user vladbailescu opened a pull request:
https://github.com/apache/sling/pull/101
SLING-4957 - Sightly RenderContextImpl contains utility methods that don't
belong there
- Moved utility methods from RenderContextImpl to RenderUtils
- Made methods static
- Removed unnecessary passing of renderContext just for utility methods
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vladbailescu/sling
SLING-4957_refactor_RenderContextImpl
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/101.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #101
----
commit a2dcfd43f37c5f3c1032df395a101a9a834ef09c
Author: vladbailescu <[email protected]>
Date: 2015-08-19T08:20:25Z
SLING-4957 - Sightly RenderContextImpl contains utility methods that don't
belong there
- Moved utility methods from RenderContextImpl to RenderUtils
- Made methods static
- Removed unnecessary passing of renderContext just for utility methods
commit 0e818da0e22354cf599b5672906d59034b82abc5
Author: vladbailescu <[email protected]>
Date: 2015-09-03T14:21:27Z
SLING-4957 - Sightly RenderContextImpl contains utility methods that don't
belong there
- Moved utility methods from RenderContextImpl to RenderUtils
- Made methods static
- Removed unnecessary passing of renderContext just for utility methods
----
> 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.6
>
>
> 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)