1
0
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:
Marcus Holl 2018-07-17 08:56:09 +02:00 committed by GitHub
commit 1c4595769d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}"