summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2014-05-24 08:11:45 -0700
committerJesse Morgan <jesse@jesterpm.net>2014-05-24 08:11:45 -0700
commitb191ad08fa7bc43706bbed52a46bc463e5affbb0 (patch)
treec35e9491fbcdc43121a3ff8b33e92a39166ece71 /src
parent865adc8dac28310f2c2285343c168816643d171c (diff)
Adding System.getProperty() override support in Config.
Diffstat (limited to 'src')
-rw-r--r--src/com/p4square/grow/config/Config.java7
1 files changed, 7 insertions, 0 deletions
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) {