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

switch statement default case not called if other match found in Pipeline DSL

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The simplest of scripts to reproduce the issue:

      switch ("triggervalue") {
          case "triggervalue":
              echo "triggervalue match"
          default:
              echo "Sorry, this does not print..."
      }
      

      When no other case is triggered, then the default does seem to work.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bwijsmuller bwijsmuller
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: