mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-03 15:02:35 +02:00
* remove NonCPS statement * remove NonCPS anntotation * fix typo * remove NonCPS anntotation * remove NonCPS anntotation * remove NonCPS anntotation * remove NonCPS anntotation * remove NonCPS anntotation * remove Iterable * remove mixins * add mixins * add mixins 2 * add mixins 3 * add NonCPS anntotation * remove tokenize * remove closure * remove closure * replace closure * use Object * use Object * use Object * remove object * remove object * add logic * change type * change type * remove NonCPS anntotation * remove NonCPS anntotation * add import
24 lines
674 B
Groovy
24 lines
674 B
Groovy
package com.sap.piper
|
|
|
|
|
|
@API(deprecated = true)
|
|
class ConfigurationMerger {
|
|
static Map merge(Map configs, Set configKeys, Map defaults) {
|
|
Map filteredConfig = configKeys?configs.subMap(configKeys):configs
|
|
|
|
return MapUtils.merge(MapUtils.pruneNulls(defaults),
|
|
MapUtils.pruneNulls(filteredConfig))
|
|
}
|
|
|
|
static Map merge(
|
|
Map parameters, Set parameterKeys,
|
|
Map configuration, Set configurationKeys,
|
|
Map defaults=[:]
|
|
){
|
|
Map merged
|
|
merged = merge(configuration, configurationKeys, defaults)
|
|
merged = merge(parameters, parameterKeys, merged)
|
|
return merged
|
|
}
|
|
}
|