Optimize Utility.combine for length 1 arguments

This commit is contained in:
Andrew Gaul 2011-10-25 13:10:47 -07:00
parent 47a4bd77ad
commit 844db81b8d
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,8 @@ public class Utility {
return null;
} else if (parts.length == 0) {
return "";
} else if (parts.length == 1) {
return parts[0].toString();
}
StringBuilder sb = new StringBuilder();
sb.append(parts[0]);