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:
desht 2012-02-21 10:25:14 +00:00
parent 247e8b163d
commit 29c1559f70

View File

@ -273,7 +273,7 @@ public class StringUtil {
}
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);
if (type != null) {