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

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

Issue 1974043002: Revert "Fix remaining strong-mode warnings and 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/link.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 75278443388f638eed4f792de401ef8c68604cbf..4ce43ea1e65507f09bbfac97a6919a66a90297ca 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -39,7 +39,7 @@ class _Platform {
// Cache the OS environemnt. This can be an OSError instance if
// retrieving the environment failed.
- static var/*OSError|Map<String,String>*/ _environmentCache;
+ static var _environmentCache;
static int get numberOfProcessors => _numberOfProcessors();
static String get pathSeparator => _pathSeparator();
@@ -62,9 +62,7 @@ class _Platform {
var env = _environment();
if (env is !OSError) {
var isWindows = operatingSystem == 'windows';
- var result = isWindows
- ? new _CaseInsensitiveStringMap<String>()
- : new Map<String, String>();
+ var result = isWindows ? new _CaseInsensitiveStringMap() : new Map();
for (var str in env) {
// The Strings returned by [_environment()] are expected to be
// valid environment entries, but exceptions have been seen
@@ -86,7 +84,7 @@ class _Platform {
if (_environmentCache is OSError) {
throw _environmentCache;
} else {
- return _environmentCache as Object/*=Map<String, String>*/;
+ return _environmentCache;
}
}
@@ -108,7 +106,7 @@ class _CaseInsensitiveStringMap<V> implements Map<String, V> {
V putIfAbsent(String key, V ifAbsent()) {
return _map.putIfAbsent(key.toUpperCase(), ifAbsent);
}
- void addAll(Map<String, V> other) {
+ void addAll(Map other) {
other.forEach((key, value) => this[key.toUpperCase()] = value);
}
V remove(Object key) => key is String ? _map.remove(key.toUpperCase()) : null;
« no previous file with comments | « sdk/lib/io/link.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698