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

Unified Diff: samples/chat/chat_server_lib.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: samples/chat/chat_server_lib.dart
diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart
index 5741417947238fc934bc7cd3dc32acc44930373a..628cd9a49c8ef74b0d7ade3659bbc8b3e7415f8c 100644
--- a/samples/chat/chat_server_lib.dart
+++ b/samples/chat/chat_server_lib.dart
@@ -377,7 +377,7 @@ class IsolatedServer {
void _joinHandler(HttpRequest request, HttpResponse response) {
StringBuffer body = new StringBuffer();
request.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () {
String data = body.toString();
if (data != null) {
@@ -411,7 +411,7 @@ class IsolatedServer {
void _leaveHandler(HttpRequest request, HttpResponse response) {
StringBuffer body = new StringBuffer();
request.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () {
String data = body.toString();
var requestData = json.parse(data);
@@ -441,7 +441,7 @@ class IsolatedServer {
void _messageHandler(HttpRequest request, HttpResponse response) {
StringBuffer body = new StringBuffer();
request.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () {
String data = body.toString();
_messageCount++;
@@ -478,7 +478,7 @@ class IsolatedServer {
void _receiveHandler(HttpRequest request, HttpResponse response) {
StringBuffer body = new StringBuffer();
request.listen(
- (data) => body.add(new String.fromCharCodes(data)),
+ (data) => body.write(new String.fromCharCodes(data)),
onDone: () {
String data = body.toString();
var requestData = json.parse(data);

Powered by Google App Engine
This is Rietveld 408576698