From b191ad08fa7bc43706bbed52a46bc463e5affbb0 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 24 May 2014 08:11:45 -0700 Subject: Adding System.getProperty() override support in Config. --- src/com/p4square/grow/config/Config.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/com/p4square/grow/config/Config.java b/src/com/p4square/grow/config/Config.java index d739d61..7c9cc0d 100644 --- a/src/com/p4square/grow/config/Config.java +++ b/src/com/p4square/grow/config/Config.java @@ -100,6 +100,13 @@ public class Config { public String getString(final String key, final String defaultValue) { String result; + // Command line properties trump all. + result = System.getProperty(key); + if (result != null) { + LOG.debug("Reading System.getProperty(" + key + "). Got result = { " + result + " }"); + return result; + } + final String domainKey = mDomain + "." + key; result = mProperties.getProperty(domainKey); if (result != null) { -- cgit v1.2.3