BUILDTOOLS-251: Make much of Bukkit locale independent

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-06-26 19:31:59 +10:00
parent b54985de63
commit 7f7f1608e8
17 changed files with 41 additions and 41 deletions

View File

@@ -99,13 +99,13 @@ public enum Art {
public static Art getByName(String name) {
Validate.notNull(name, "Name cannot be null");
return BY_NAME.get(name.toLowerCase().replaceAll("_", ""));
return BY_NAME.get(name.toLowerCase(java.util.Locale.ENGLISH).replaceAll("_", ""));
}
static {
for (Art art : values()) {
BY_ID.put(art.id, art);
BY_NAME.put(art.toString().toLowerCase().replaceAll("_", ""), art);
BY_NAME.put(art.toString().toLowerCase(java.util.Locale.ENGLISH).replaceAll("_", ""), art);
}
}
}