No reason to call String.valueOf if we're already testing for null,

because null protection is all that valueOf gives us.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1413 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2004-03-06 20:05:41 +00:00
parent 5cd72faa35
commit 72ec095af1
@@ -1,5 +1,5 @@
//
// $Id: StringUtil.java,v 1.71 2004/03/06 04:37:44 mdb Exp $
// $Id: StringUtil.java,v 1.72 2004/03/06 20:05:41 ray Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -1038,7 +1038,7 @@ public class StringUtil
if (i > 0) {
buf.append(separator);
}
String value = (values[i] == null) ? "" : String.valueOf(values[i]);
String value = (values[i] == null) ? "" : values[i].toString();
buf.append((escape) ? replace(value, ",", ",,") : value);
}
return buf.toString();