Remove the parseLocale function in SettingsService

master
jvoisin 5 years ago
parent d2ad85447b
commit 1bc5729cfb
  1. 17
      airsonic-main/src/main/java/org/airsonic/player/service/SettingsService.java

@ -901,7 +901,7 @@ public class SettingsService {
String[] lines = StringUtil.readLines(in);
for (String line : lines) {
locales.add(parseLocale(line));
locales.add(StringUtil.parseLocale(line));
}
} catch (IOException x) {
@ -912,21 +912,6 @@ public class SettingsService {
return locales.toArray(new Locale[locales.size()]);
}
private Locale parseLocale(String line) {
String[] s = line.split("_");
String language = s[0];
String country = "";
String variant = "";
if (s.length > 1) {
country = s[1];
}
if (s.length > 2) {
variant = s[2];
}
return new Locale(language, country, variant);
}
/**
* Returns the "brand" name. Normally, this is just "Airsonic".
*

Loading…
Cancel
Save