This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      Defining closure with vararg does not work in a pipeline script:

      def fn = {String... args -> echo args.toString()}
      fn('one', 'two', 'three')
      
      Output:
      one
      

      Only workaround I can find is to not use closure:

      def fn(String... args){echo args.toString()}
      fn('one', 'two', 'three')
      
      Output:
      [one, two, three]
      

            Assignee:
            vjuranek
            Reporter:
            Di Shang
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: