You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2016/05/22 08:08:12 UTC
[jira] [Updated] (GROOVY-6203) GroovyScriptEngine does not take
script base class into account
[ https://issues.apache.org/jira/browse/GROOVY-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher updated GROOVY-6203:
--------------------------------------
Labels: (was: contrib)
> GroovyScriptEngine does not take script base class into account
> ---------------------------------------------------------------
>
> Key: GROOVY-6203
> URL: https://issues.apache.org/jira/browse/GROOVY-6203
> Project: Groovy
> Issue Type: Bug
> Components: GroovyScriptEngine
> Affects Versions: 2.0.5
> Reporter: Julien Nicoulaud
> Fix For: 2.4.7
>
>
> When configuring GroovyScriptEngine with a custom script base class, the script engine does not take it account:
> {code}
> CompilerConfiguration cc = new CompilerConfiguration();
> cc.setScriptBaseClass(ScriptBase.class.getName());
> GroovyScriptEngine engine = new GroovyScriptEngine("file://.");
> engine.setConfig(cc);
> Script script = engine.createScript("test.groovy", new Binding());
> assertTrue(script instanceof ScriptBase); // fails
> {code}
> This has been discussed here: http://groovy.329449.n5.nabble.com/setScriptBaseClass-does-not-work-for-GroovyScriptEngine-td5710646.html
> The workaround with setting the CompilerConfiguration on the GroovyClassLoader works.
> Also related: GROOVY-3281
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)