1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

[refactor] re-use getConfigPropery inside getMandatoryProperty

... instead of accessing the config map directy.

With that we ensure that getMandatoryProperty behaves the same like
getConfigProperty. Currently we differ e.g. with trim().
This commit is contained in:
Marcus Holl 2018-07-13 11:28:55 +02:00
parent a49c17c869
commit 64291cd88f

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