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

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

Issue 1966373002: Revert "Fix strong mode errors in dart:io." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/platform_impl.dart
diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart
index 4ce43ea1e65507f09bbfac97a6919a66a90297ca..8c9d30c027cd3085a7d3193177175b2ce8279c1e 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -96,20 +96,19 @@ class _Platform {
class _CaseInsensitiveStringMap<V> implements Map<String, V> {
final Map<String, V> _map = new Map<String, V>();
- bool containsKey(Object key) =>
- key is String && _map.containsKey(key.toUpperCase());
+ bool containsKey(String key) => _map.containsKey(key.toUpperCase());
bool containsValue(Object value) => _map.containsValue(value);
- V operator [](Object key) => key is String ? _map[key.toUpperCase()] : null;
+ V operator [](String key) => _map[key.toUpperCase()];
void operator []=(String key, V value) {
_map[key.toUpperCase()] = value;
}
V putIfAbsent(String key, V ifAbsent()) {
- return _map.putIfAbsent(key.toUpperCase(), ifAbsent);
+ _map.putIfAbsent(key.toUpperCase(), ifAbsent);
}
- void addAll(Map other) {
+ addAll(Map other) {
other.forEach((key, value) => this[key.toUpperCase()] = value);
}
- V remove(Object key) => key is String ? _map.remove(key.toUpperCase()) : null;
+ V remove(String key) => _map.remove(key.toUpperCase());
void clear() { _map.clear(); }
void forEach(void f(String key, V value)) { _map.forEach(f); }
Iterable<String> get keys => _map.keys;
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698