From 54120f374eea5084634830d34c99a9137b22a310 Mon Sep 17 00:00:00 2001 From: Jasen Schremmer Date: Tue, 28 Jan 2020 13:13:13 +1100 Subject: [PATCH] Allow properties with a default value to be overridden by an environment variable, to be consistent with the handling of properties without a default value --- .../java/ca/uhn/fhir/jpa/starter/HapiProperties.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java index e58490d..a4525d2 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java @@ -178,14 +178,10 @@ public class HapiProperties { } private static String getProperty(String propertyName, String defaultValue) { - Properties properties = HapiProperties.getProperties(); + String value = getProperty(propertyName); - if (properties != null) { - String value = properties.getProperty(propertyName); - - if (value != null && value.length() > 0) { - return value; - } + if (value != null && value.length() > 0) { + return value; } return defaultValue;