mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Feel free to shoot this down, but it looks like the replace() call in StringUtil.lookup() should really be replaceAll(). "[ _]" looks like a regular expression to me, and one that makes sense.
This commit is contained in:
parent
247e8b163d
commit
29c1559f70
@ -273,7 +273,7 @@ public class StringUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Enum<?>> T lookup(Map<String, T> lookup, String name, boolean fuzzy) {
|
public static <T extends Enum<?>> T lookup(Map<String, T> lookup, String name, boolean fuzzy) {
|
||||||
String testName = name.replace("[ _]", "").toLowerCase();
|
String testName = name.replaceAll("[ _]", "").toLowerCase();
|
||||||
|
|
||||||
T type = lookup.get(testName);
|
T type = lookup.get(testName);
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user