If the normalized version of a name is the same as the raw version, it

may already be the case that the normalize() method returned the same
String, but if not, ensure that we're only holding on to one of those Strings.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4297 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-08-04 23:04:29 +00:00
parent 47a8a27a4e
commit 52bd679f6c
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -60,6 +60,11 @@ public class Name extends SimpleStreamableObject
{
if (_normal == null) {
_normal = normalize(_name);
// if _normal is an equals() String, ensure both point to the
// same string for efficiency
if (_normal.equals(_name)) {
_normal = _name;
}
}
return _normal;
}