From c19b395a43acf843d299c275d013a2665c9aa29a Mon Sep 17 00:00:00 2001 From: Charlie Groves Date: Mon, 31 Jan 2011 07:08:12 +0000 Subject: [PATCH] Name normalization has been space sensitive for nearly 7 years now. Stop saying otherwise. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6472 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/main/java/com/threerings/util/Name.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/threerings/util/Name.java b/src/main/java/com/threerings/util/Name.java index 4c6a849e5..54e3936da 100644 --- a/src/main/java/com/threerings/util/Name.java +++ b/src/main/java/com/threerings/util/Name.java @@ -148,17 +148,12 @@ public class Name extends SimpleStreamableObject } /** - * Returns a normalized version of the supplied name. The default - * implementation is case and space insensitive. + * Returns a normalized version of the supplied name. The default implementation is case + * insensitive. */ protected String normalize (String name) { - name = name.toLowerCase(); - // Originally we removed whitespace as part of normalization, but - // that ran aground when a player was named "Badbob" and an npp - // was named "Bad Bob". -RG - //name = _compactor.matcher(name).replaceAll(""); - return name; + return name.toLowerCase(); } /** @@ -186,7 +181,4 @@ public class Name extends SimpleStreamableObject /** The normalized name text. */ protected transient String _normal; - - /** Used to strip spaces from names. */ - //protected static Pattern _compactor = Pattern.compile("\\s"); }