[JIRA] (JENKINS-57499) booleanParam will give String variable

2 views
Skip to first unread message

Christian.Opitz@de.bosch.com (JIRA)

unread,
May 16, 2019, 3:29:03 AM5/16/19
to jenkinsc...@googlegroups.com
Christian Opitz created an issue
 
Jenkins / Bug JENKINS-57499
booleanParam will give String variable
Issue Type: Bug Bug
Assignee: Sam Van Oort
Components: pipeline-stage-view-plugin
Created: 2019-05-16 07:28
Environment: Jenkins ver. 2.164.2
Priority: Minor Minor
Reporter: Christian Opitz

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...

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages