From 75e6e6d036e6089eced4806a1be5ea48e3545c73 Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Tue, 4 Aug 2009 19:20:49 +0000 Subject: Fixes the unit tests of the ConfigurationService broken by the previous commit. --- .../impl/configuration/ConfigurationServiceImpl.java | 9 +-------- .../impl/configuration/PropertyConfigurationStore.java | 4 +++- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'src/net/java/sip/communicator/impl') diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java index 1c9c67d..fe493e1 100644 --- a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java +++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java @@ -33,13 +33,6 @@ public class ConfigurationServiceImpl { private final Logger logger = Logger.getLogger(ConfigurationServiceImpl.class); - /** - * The name of the system property that stores the name of the configuration - * file. - */ - private static final String FILE_NAME_PROPERTY - = "net.java.sip.communicator.CONFIGURATION_FILE_NAME"; - private static final String SYS_PROPS_FILE_NAME_PROPERTY = "net.java.sip.communicator.SYS_PROPS_FILE_NAME"; @@ -729,7 +722,7 @@ public class ConfigurationServiceImpl throws IOException { //see whether we have a user specified name for the conf file - String pFileName = getSystemProperty(FILE_NAME_PROPERTY); + String pFileName = getSystemProperty(PNAME_CONFIGURATION_FILE_NAME); if (pFileName == null) pFileName = "sip-communicator." + extension; diff --git a/src/net/java/sip/communicator/impl/configuration/PropertyConfigurationStore.java b/src/net/java/sip/communicator/impl/configuration/PropertyConfigurationStore.java index 8d7fb33..a4dbca3 100644 --- a/src/net/java/sip/communicator/impl/configuration/PropertyConfigurationStore.java +++ b/src/net/java/sip/communicator/impl/configuration/PropertyConfigurationStore.java @@ -19,7 +19,9 @@ public class PropertyConfigurationStore public Object getProperty(String name) { - return properties.get(name); + Object value = properties.get(name); + + return (value != null) ? value : System.getProperty(name); } public String[] getPropertyNames() -- cgit v1.1