[ https://issues.apache.org/jira/browse/GROOVY-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher resolved GROOVY-6203. --------------------------------------- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.7 Pull request merged. Thanks! > 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 > Assignee: Pascal Schumacher > 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)