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

Class loading in Groovy 2.5 breaks class loading hierarchy

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: class generator
    • Labels:
      None

      Description

      Prior to Groovy 2.5 GroovyClassLoader passed classes requested by script code like

       

      def obj = new org.example.NonScriptableClass()

      to its parent class loader (hereby the NonScriptableClasses are Java classes).

      We use this behavior to allow or deny loading of Java classes with the parent class loader based on certain annotations on the respective class.

      With Groovy 2.5 this behavior has changed. org.example.NonScriptableClass is no more passed to the parent class loader. This breaks our security mechanism.

        Attachments

          Activity

            People

            • Assignee:
              jwagenleitner John Wagenleitner
              Reporter:
              veita Alexander Veit
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: