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

CPS interpreter fails on calls to find(), findAll() default methods

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      The CPS interpreter does not translate calls to .find() , .findAll() default methods correctly.

      The following test case fails:

      assert evalCPS("[1,2,3].find { it > 1 }") == 2
      

      I see that groovy-cps has an CpsDefaultGroovyMethods class that provides an alternate implementation of each(). Does this mean that all methods that accept a closure as an argument will also fail?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                akbertram Alexander Bertram
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: