Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49065

Unexpected groovy.lang.MissingPropertyException when extending Closure class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • groovy-plugin

      groovy.lang.MissingPropertyException: No such property: node for class: Test
      Possible solutions: node
      is thrown by

      class Test extends Closure {
          def node
      
          Test() {
              super(null)
          }
          def doCall() {
              node += "world"
          }
      }
      
      node('master') {
          stage("1") {
              new Test(node: "hello")()
          }
      }

            vjuranek vjuranek
            roel0 roel postelmans
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: