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

Unified Diff: sdk/lib/io/http_headers.dart

Issue 15001028: Fix type warnings in API and helpers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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: sdk/lib/io/http_headers.dart
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart
index 598371732c81b9b090e019dd309c90b675b4d1f2..bbefd45672785b09784655f19d58112fa014a6b9 100644
--- a/sdk/lib/io/http_headers.dart
+++ b/sdk/lib/io/http_headers.dart
@@ -207,7 +207,7 @@ class _HttpHeaders implements HttpHeaders {
_set(HttpHeaders.CONTENT_TYPE, contentType.toString());
}
- void _add(String name, Object value) {
+ void _add(String name, var value) {
Søren Gjesse 2013/05/15 12:55:03 Can't you remove var here? In other places in dart
Johnni Winther 2013/05/17 12:06:42 Done.
var lowerCaseName = name.toLowerCase();
// TODO(sgjesse): Add immutable state throw HttpException is immutable.
if (lowerCaseName == HttpHeaders.CONTENT_LENGTH) {
@@ -250,13 +250,13 @@ class _HttpHeaders implements HttpHeaders {
}
} else if (lowerCaseName == HttpHeaders.HOST) {
if (value is String) {
- int pos = (value as String).indexOf(":");
+ int pos = value.indexOf(":");
if (pos == -1) {
_host = value;
_port = HttpClient.DEFAULT_HTTP_PORT;
} else {
if (pos > 0) {
- _host = (value as String).substring(0, pos);
+ _host = value.substring(0, pos);
} else {
_host = null;
}

Powered by Google App Engine
This is Rietveld 408576698