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

CPS-transformed "for" with empty termination never loops (should always)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None
    • groovy-cps/master bd35d05

      An empty "for" termination is always looped (treated as true).

      for (;;) {
        // infinite loop
      }
      

      CPS transformed version never loops. Test for CpsTransformerTest currently fails:

          @Test
          public void emptyForCondition() throws Throwable {
              assertEvaluate(true,
                             "boolean looped = false;\n"+
                             "for (;;) { looped = true; break; }\n"+
                             "looped");
          }
      

            Unassigned Unassigned
            vallon Justin Vallon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: