import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
return null;
name = name.trim();
for (Enum<T> e : enumClass.getEnumConstants()) {
- if (e.name().toLowerCase().replace("_", "").equals(name)) {
+ if (e.name().toLowerCase(Locale.ENGLISH).replace("_", "").equals(name)) {
return e;
}
}
if (element.equals("ignitionevent")) {
MotorMount.IgnitionEvent event = null;
for (MotorMount.IgnitionEvent e : MotorMount.IgnitionEvent.values()) {
- if (e.name().toLowerCase().replaceAll("_", "").equals(content)) {
+ if (e.name().toLowerCase(Locale.ENGLISH).replaceAll("_", "").equals(content)) {
event = e;
break;
}
// Motor type
type = null;
for (Motor.Type t : Motor.Type.values()) {
- if (t.name().toLowerCase().equals(content.trim())) {
+ if (t.name().toLowerCase(Locale.ENGLISH).equals(content.trim())) {
type = t;
break;
}
// Check type if specified
str = attributes.remove("type");
- if (str != null && !type.name().toLowerCase().equals(str)) {
+ if (str != null && !type.name().toLowerCase(Locale.ENGLISH).equals(str)) {
warnings.add(Warning.fromString("Illegal material type specified, ignoring."));
return;
}