diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-08-14 12:50:36 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-08-14 12:50:36 +0000 |
| commit | 401ab61bdc05fa510c47bd3c7c7b3711c24cf591 (patch) | |
| tree | 64ad1b5713fba99ce610d1dea4da93213525da12 /java/broker/src/main | |
| parent | d857695ee4c8496e3ea4aceb0bb611cedb0df71b (diff) | |
| download | qpid-python-401ab61bdc05fa510c47bd3c7c7b3711c24cf591.tar.gz | |
QPID-2001 : Default Locale should be the VMs locale not en_US.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@804201 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src/main')
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java index 90b4590d4c..7ea7738189 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java @@ -55,7 +55,6 @@ public class ServerConfiguration implements SignalHandler public static final int DEFAULT_BUFFER_WRITE_LIMIT_SIZE = 262144; public static final boolean DEFAULT_BROKER_CONNECTOR_PROTECTIO_ENABLED = false; public static final String DEFAULT_STATUS_UPDATES = "on"; - public static final String DEFAULT_ADVANCED_LOCALE = Locale.US.toString(); private static final int DEFAULT_FRAME_SIZE = 65536; private static final int DEFAULT_PORT = 5672; @@ -150,7 +149,7 @@ public class ServerConfiguration implements SignalHandler { XMLConfiguration vhostConfiguration = new XMLConfiguration((String) thing); List hosts = vhostConfiguration.getList("virtualhost.name"); - for (int j = 0; j < hosts.size(); j++) + for (int j = 0; j < hosts.size(); j++) { String name = (String) hosts.get(j); // Add the keys of the virtual host to the main config then bail out @@ -221,12 +220,18 @@ public class ServerConfiguration implements SignalHandler public Locale getLocale() { - String localeString = getConfig().getString(ADVANCED_LOCALE, DEFAULT_ADVANCED_LOCALE); + String localeString = getConfig().getString(ADVANCED_LOCALE); // Expecting locale of format langauge_country_variant + // If the configuration does not have a defined locale use the JVM default + if (localeString == null) + { + return Locale.getDefault(); + } + String[] parts = localeString.split("_"); - Locale locale = null; + Locale locale; switch (parts.length) { case 1: |
