From 29c1559f7087588714a3d17a6157963de6b01d20 Mon Sep 17 00:00:00 2001 From: desht Date: Tue, 21 Feb 2012 10:25:14 +0000 Subject: [PATCH] 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. --- src/main/java/com/sk89q/util/StringUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/util/StringUtil.java b/src/main/java/com/sk89q/util/StringUtil.java index b706cb633..5911d9176 100644 --- a/src/main/java/com/sk89q/util/StringUtil.java +++ b/src/main/java/com/sk89q/util/StringUtil.java @@ -273,7 +273,7 @@ public class StringUtil { } public static > T lookup(Map lookup, String name, boolean fuzzy) { - String testName = name.replace("[ _]", "").toLowerCase(); + String testName = name.replaceAll("[ _]", "").toLowerCase(); T type = lookup.get(testName); if (type != null) {