You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2018/01/02 10:28:21 UTC
[sling-org-apache-sling-scripting-freemarker] 01/06: style
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-freemarker.git
commit 607ab4fb44638a68ef2472c4eba0271d033786c7
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Dec 30 20:45:33 2017 +0100
style
---
.../sling/scripting/freemarker/internal/FreemarkerScriptEngine.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngine.java b/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngine.java
index 0e4b78b..12d4f0c 100644
--- a/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngine.java
+++ b/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngine.java
@@ -45,14 +45,14 @@ public class FreemarkerScriptEngine extends AbstractSlingScriptEngine {
configuration.setDefaultEncoding(StandardCharsets.UTF_8.name());
}
- public Object eval(Reader reader, ScriptContext scriptContext) throws ScriptException {
+ public Object eval(final Reader reader, final ScriptContext scriptContext) throws ScriptException {
final Bindings bindings = scriptContext.getBindings(ScriptContext.ENGINE_SCOPE);
final SlingScriptHelper helper = (SlingScriptHelper) bindings.get(SlingBindings.SLING);
if (helper == null) {
throw new ScriptException("SlingScriptHelper missing from bindings");
}
- freemarkerScriptEngineFactory.getTemplateModels().forEach(bindings::put);
+ bindings.putAll(freemarkerScriptEngineFactory.getTemplateModels());
final String scriptName = helper.getScript().getScriptResource().getPath();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.