mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Merge pull request #209 from marcusholl/pr/refactorGetMandatoryProperty
[refactor] re-use getConfigPropery inside getMandatoryProperty
This commit is contained in:
commit
1c4595769d
@ -109,10 +109,7 @@ class ConfigurationHelper implements Serializable {
|
||||
|
||||
def getMandatoryProperty(key, defaultValue = null, errorMessage = null) {
|
||||
|
||||
def paramValue = config[key]
|
||||
|
||||
if (paramValue == null)
|
||||
paramValue = defaultValue
|
||||
def paramValue = getConfigProperty(key, defaultValue)
|
||||
|
||||
if (paramValue == null) {
|
||||
if(! errorMessage) errorMessage = "ERROR - NO VALUE AVAILABLE FOR ${key}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user