Boolean parameters injected as String

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

XMLWordPrintable

      Consider the following workflow script:

      echo "bool=$bool"
      echo bool.getClass().toString()

      Output:

      Started by user Jos Backus
      Running: Print Message
      bool=false
      Running: Print Message
      class java.lang.String
      Running: End of Workflow
      Finished: SUCCESS

      I would expect the name of the class to be java.lang.Boolean, not java.lang.String. This forces one to add lines such as:

      bool = bool == 'true'

            Assignee:
            Jesse Glick
            Reporter:
            Jos Backus
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: