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

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

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline
    • None

      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?

          [JENKINS-26300] CPS interpreter fails on calls to find(), findAll() default methods

          Alexander Bertram created issue -
          Jesse Glick made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Kohsuke Kawaguchi [ kohsuke ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-26307 [ JENKINS-26307 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26481 [ JENKINS-26481 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160361 ] New: JNJira + In-Review [ 196402 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Kenneth Baltrinic made changes -
          Link New: This issue is related to JENKINS-42635 [ JENKINS-42635 ]

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

              Created:
              Updated:
              Resolved: