[lang][patch] Remove redundant check for null separator in StringUtils#join
Submitted by:	Janek Bogucki
Reviewed by:	Gary Gregory.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137795 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2004-02-16 23:48:10 +00:00
parent c524021b45
commit 0b92157846
1 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@
* @author Phil Steitz
* @author Al Chou
* @since 1.0
* @version $Id: StringUtils.java,v 1.123 2004/02/13 23:32:39 scolebourne Exp $
* @version $Id: StringUtils.java,v 1.124 2004/02/16 23:48:10 ggregory Exp $
*/
public class StringUtils {
// Performance testing notes (JDK 1.4, Jul03, scolebourne)
@ -2324,12 +2324,12 @@ public static String join(Object[] array, String separator) {
? 0
: arraySize
* ((array[0] == null ? 16 : array[0].toString().length())
+ ((separator != null) ? separator.length() : 0)));
+ separator.length()));
StringBuffer buf = new StringBuffer(bufSize);
for (int i = 0; i < arraySize; i++) {
if ((separator != null) && (i > 0)) {
if (i > 0) {
buf.append(separator);
}
if (array[i] != null) {