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

Proxy of a Proxy Fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6-rc-2
    • 1.6.1, 1.5.8, 1.7-beta-1
    • groovy-jdk
    • None

    Description

      import groovy.util.Proxy

      class Proxy1 extends Proxy {
      def foo()

      { println "Foo" }

      }

      class Proxy2 extends Proxy {
      def bar()

      { println "Bar" }

      }

      class Obj {
      def baz()

      { println "Baz" }

      }

      def proxy1 = new Proxy1()
      def proxy2 = new Proxy2()
      proxy1.adaptee = proxy2
      proxy2.adaptee = new Obj()

      proxy1.baz() // Explodes – No signature of method: Proxy2.baz() is applicable for argument types: () values: []

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            robertfischer Robert Fischer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: