Index: sdk/lib/collection/collections.dart |
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart |
index 54c1fa9866cd07023bd25eb0633d7074420c3d96..f51d98daaabeb87b5ab5bb1613a0f12e4fd5cc6e 100644 |
--- a/sdk/lib/collection/collections.dart |
+++ b/sdk/lib/collection/collections.dart |
@@ -282,7 +282,7 @@ class IterableMixinWorkaround { |
static String join(Iterable iterable, [String separator]) { |
StringBuffer buffer = new StringBuffer(); |
- buffer.writeAll(iterable, separator == null ? "" : separator); |
+ buffer.writeAll(iterable, separator); |
return buffer.toString(); |
} |
@@ -290,15 +290,15 @@ class IterableMixinWorkaround { |
if (list.isEmpty) return ""; |
if (list.length == 1) return "${list[0]}"; |
StringBuffer buffer = new StringBuffer(); |
- if (separator == null || separator == "") { |
+ if (separator.isEmpty) { |
for (int i = 0; i < list.length; i++) { |
- buffer.write("${list[i]}"); |
+ buffer.write(list[i]); |
} |
} else { |
- buffer.write("${list[0]}"); |
+ buffer.write(list[0]); |
for (int i = 1; i < list.length; i++) { |
buffer.write(separator); |
- buffer.write("${list[i]}"); |
+ buffer.write(list[i]); |
} |
} |
return buffer.toString(); |