Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
Patch
Description
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.
https://github.com/groovy/groovy-core/pull/6#issuecomment-3542655
https://github.com/tiagofernandez/groovy-core/commit/bbada97d89a45708d1fad86313544df153e2040d