summaryrefslogtreecommitdiff
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
commit1d6b341c90bf57120cc5967bf59666f2f4fd90e2 (patch)
tree8f6ebba2efbcb4b5a0c69d2461b4bd0434484d4c
parent71b1c57aad075b26d7be1e4b80d5d4fa19746486 (diff)
Adding System.getProperty() override support in Config.
-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) {