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

@Delegate throws exception when the delegate target has private superinterface

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.6.1, 1.7-beta-1
    • Compiler
    • None

    Description

      e.g.

      import java.util.zip.*
      class ZipWrapper{
          @Delegate ZipFile zipFile
      }
      
      ERROR java.lang.IllegalAccessError: class ZipWrapper cannot access its superinterface java.util.zip.ZipConstants
              at java_lang_Runnable$run.call (Unknown Source)
      

      workaround as suggested by Guillaume

      @Delegate(interfaces = false)
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            mingfai Mingfai Ma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: