Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1032)

Unified Diff: runtime/bin/process_patch.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/process_patch.dart
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 4468ec09379b72af15a20d4d54ab183960f57a66..4893ceef04afc92d195c335c82e74f384033a3e1 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -118,27 +118,27 @@ class _ProcessImpl extends NativeFieldWrapperClass1 implements Process {
numBackslash++;
pos--;
}
- sb.add(argument.substring(nextPos, quotePos - numBackslash));
+ sb.write(argument.substring(nextPos, quotePos - numBackslash));
for (var i = 0; i < numBackslash; i++) {
- sb.add(r'\\');
+ sb.write(r'\\');
}
- sb.add(r'\"');
+ sb.write(r'\"');
nextPos = quotePos + 1;
quotePos = argument.indexOf('"', nextPos);
}
- sb.add(argument.substring(nextPos, argument.length));
+ sb.write(argument.substring(nextPos, argument.length));
result = sb.toString();
// Add '"' at the beginning and end and replace all '\' at
// the end with two '\'.
sb = new StringBuffer('"');
- sb.add(result);
+ sb.write(result);
nextPos = argument.length - 1;
while (argument.codeUnitAt(nextPos) == backslash) {
- sb.add('\\');
+ sb.write('\\');
nextPos--;
}
- sb.add('"');
+ sb.write('"');
result = sb.toString();
}
@@ -302,7 +302,7 @@ Future<ProcessResult> _runNonInteractiveProcess(String path,
.reduce(
new StringBuffer(),
(buf, data) {
- buf.add(data);
+ buf.write(data);
return buf;
});
@@ -311,7 +311,7 @@ Future<ProcessResult> _runNonInteractiveProcess(String path,
.reduce(
new StringBuffer(),
(buf, data) {
- buf.add(data);
+ buf.write(data);
return buf;
});

Powered by Google App Engine
This is Rietveld 408576698