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

Method pointer operator (.&) broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • workflow-cps-plugin
    • Jenkins 1.6.11
      Workflow 1.6

      The method pointer operator (.&) is entirely broken. The following test:

      def bar = 'foo'.&toUpperCase
      

      Results in:

      startup failed:
      General error during canonicalization: java.lang.UnsupportedOperationException
      

      Plus a giant call stack.

      The workaround is to instead explicitly create a closure which calls the method, which is syntactically cumbersome and reduces semantic readability.

            jglick Jesse Glick
            sumdumgai A C
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: