String[] localeStrings = configuredLocales.split(",");
String[] localeStrings = StringUtil.standardSplit(configuredLocales);
    public void init(Configuration configuration) throws Exception {        this.configuration = configuration;        String configuredLocales =                configuration.getBootstrapPropertyResolver().getProperty(LOCALE_LIST);        if (configuredLocales == null || configuredLocales.equals("")) {            log.info("No locale list specified, defaulting to single locale: ", Locale.getDefault());            this.locales.add(Locale.getDefault());        }        else {            // Split apart the Locales on commas, and then parse the local strings into their bits            String[] localeStrings = configuredLocales.split(",");            for (String localeString : localeStrings) {                // Each locale string can be made up of two parts, locale:encoding                // and the locale can be made up of up to three segment, e.g. en_US_PC                String[] halves = localeString.split(":");                String[] parts = halves[0].split("[-_]");                Locale locale = null;                if (parts.length == 1) {                    locale = new Locale(parts[0].trim().toLowerCase());                }                else if (parts.length == 2) {                    locale = new Locale(parts[0].trim().toLowerCase(),                                        parts[1].trim().toUpperCase());                }                else if (parts.length == 3) {                    locale =  new Locale(parts[0].trim().toLowerCase(),                                         parts[1].trim().toUpperCase(),                                         parts[2].trim());                }                else {                    log.error("Configuration property ", LOCALE_LIST, " contained a locale value ",                              "that split into more than three parts! The parts were: ", parts);                }                this.locales.add(locale);                // Now check to see if a character encoding was specified, and if so is it valid                if (halves.length == 2) {                    String encoding = halves[1];                    if (Charset.isSupported(encoding)) {                        this.encodings.put(locale, halves[1]);                    }                    else {                        log.error("Configuration property ", LOCALE_LIST, " contained a locale value ",                                  "with an unsupported character encoding. The offending entry is: ",                                  localeString);                    }                }            }            log.debug("Configured DefaultLocalePicker with locales: ", this.locales);            log.debug("Configured DefaultLocalePicker with encodings: ", this.encodings);        }    }