From 971b6ce109b19231bb0514b45a343ced822dd404 Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Tue, 27 Jan 2015 19:36:48 +0000 Subject: QPID-6339 : Use variable interpolation for help url and initial virtual host config git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1655125 13f79535-47bb-0310-9956-ffa450edef68 --- .../broker/src/main/java/org/apache/qpid/server/Main.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'qpid/java/broker') diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java index f4c6926a17..5f32dd3352 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java @@ -328,14 +328,19 @@ public class Main initialPropertiesLocation = (new File(initialProperties)).toURI().toURL(); } - Properties props = new Properties(); - props.load(initialPropertiesLocation.openStream()); + Properties props = new Properties(QpidProperties.asProperties()); + if(initialPropertiesLocation != null) + { + props.load(initialPropertiesLocation.openStream()); + } + Set propertyNames = new HashSet<>(props.stringPropertyNames()); propertyNames.removeAll(System.getProperties().stringPropertyNames()); - for(String propName : propertyNames) + for (String propName : propertyNames) { System.setProperty(propName, props.getProperty(propName)); } + } private void copyInitialConfigFile(final BrokerOptions options, final File destinationFile) -- cgit v1.2.1