[Pipeline] Some non-CPS transformable code will not throw errors

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

XMLWordPrintable

      The groovy cps documentation does warn that some loop constructs are not cps transformable.
      However, when they are used, they will behave incorrectly (and silently) rather than throwing an error.

      repro case

      println (["dog", "cat"].findAll{it.contains("dog")})
      

      In a regular groovy shell, this will return ["dog"], as you would expect. In a pipeline job, this will return true.

            Assignee:
            Unassigned
            Reporter:
            Sean Sutherland
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: