booleanParam will give String variable

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Environment:
      Jenkins ver. 2.164.2

      Defining a boolean parameter will not return a boolean value as expected, but a String value.

      Defining the parameter:{{}}

      parameters { booleanParam(name: 'bForceCheckout', defaultValue: false, description: '') }

      Checking the type...

      println bForceCheckout.getClass()
      

      ...will give you:

      09:06:03 class java.lang.String
      

      This of course leads to some nice behaviour when checking the variable in conditions...

            Assignee:
            Unassigned
            Reporter:
            Christian Opitz
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: