From 64291cd88f78e01a49db58b22d430d63b8d1f608 Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Fri, 13 Jul 2018 11:28:55 +0200 Subject: [PATCH] [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(). --- src/com/sap/piper/ConfigurationHelper.groovy | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/com/sap/piper/ConfigurationHelper.groovy b/src/com/sap/piper/ConfigurationHelper.groovy index 4e6bb6627..ee78dc459 100644 --- a/src/com/sap/piper/ConfigurationHelper.groovy +++ b/src/com/sap/piper/ConfigurationHelper.groovy @@ -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}"