1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

use MapUtils

This commit is contained in:
Christopher Fenner 2018-02-08 10:21:38 +01:00
parent f278bbbd14
commit 8adf79bfe1

View File

@ -2,6 +2,7 @@ import com.cloudbees.groovy.cps.NonCPS
import com.sap.piper.ConfigurationLoader
import com.sap.piper.ConfigurationMerger
import com.sap.piper.MapUtils
import groovy.transform.Field
@ -93,14 +94,9 @@ def reportWarnings(parserName, settings, doArchive){
}
}
@NonCPS
def isMap(object){
return object in Map
}
@NonCPS
def toMap(parameter){
if(isMap(parameter))
if(MapUtils.isMap(parameter))
parameter.put('active', true)
else if(Boolean.TRUE.equals(parameter))
parameter = [active: true]