This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-java.git
The following commit(s) were added to refs/heads/master by this push:
new 4abea89 SLING-10448 - The Java Script Engine is not made available
any more
4abea89 is described below
commit 4abea892190217cee0b643c161a0f12b703f2b2d
Author: Radu Cotescu <[email protected]>
AuthorDate: Wed Jun 2 17:27:24 2021 +0200
SLING-10448 - The Java Script Engine is not made available any more
* made sure the JavaScriptEngineFactory correctly provides the list of
short names of the script engine it provides
---
.../org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
b/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
index b488d1e..7606904 100644
---
a/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
+++
b/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
@@ -65,8 +65,6 @@ import org.slf4j.LoggerFactory;
@Component(service={javax.script.ScriptEngineFactory.class,
ResourceChangeListener.class},
property={
"extensions=" + JavaScriptEngineFactory.SCRIPT_TYPE,
- "names=java",
- "names=Java",
Constants.SERVICE_VENDOR + "=The Apache Software
Foundation",
Constants.SERVICE_DESCRIPTION + "=" +
JavaScriptEngineFactory.DESCRIPTION,
ResourceChangeListener.CHANGES + "=CHANGED",
@@ -125,6 +123,7 @@ public class JavaScriptEngineFactory
*/
public JavaScriptEngineFactory() {
setExtensions(SCRIPT_TYPE);
+ setNames("java", "Java");
}
/**
@@ -174,7 +173,6 @@ public class JavaScriptEngineFactory
this.ioProvider = new SlingIOProvider(this.javaCompiler, opts);
this.javaServletContext = new JavaServletContext(ioProvider,
slingServletContext);
-
this.servletConfig = new JavaServletConfig(javaServletContext, props);
logger.info("Activating Apache Sling Script Engine for Java with
options {}", opts);