Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5255

GroovyClassLoader-aware constructor of GroovyScriptEngineImpl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 1.8.6, 2.0-beta-3
    • GroovyScriptEngine
    • 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

      Attachments

        Activity

          People

            melix Cédric Champeau
            tiagofernandez Tiago Fernandez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified