groovy/groovy-core — pull request #6 by tiagofernandez (2011-11-07 14:14:35+00:00)
Title: GroovyClassLoader-aware constructor of GroovyScriptEngineImpl (JSR-223)

Today when a `GroovyScriptEngineImpl` instance is created (directly or via `GroovyScriptEngineFactory`), a new `GroovyClassLoader` is systematically instantiated. This behavior is perfect for most of the cases, but sometimes the embedded class loader might be overwritten for class loading tweaking purposes, or to ensure the usage of a custom compiler configuration.

The idea of this change is to provide an extra constructor which allows passing a custom class loader as parameter, so we avoid wasting time and resources creating a class loader which will be overridden afterwards.