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:
parent
f278bbbd14
commit
8adf79bfe1
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user