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

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

Issue 325533002: Fixed toString of Platform.environment on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: going simple Created 6 years, 6 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 | « no previous file | no next file » | 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 c6063a8c21265283f710ee427b0d959041586bc7..91bb7a7c3b6c81240f62e21c4354f71aad795d57 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -71,7 +71,7 @@ class _Platform {
result[str.substring(0, equalsIndex)] =
str.substring(equalsIndex + 1);
}
- _environmentCache = new UnmodifiableMapView(result);
+ _environmentCache = new UnmodifiableMapView<String, String>(result);
} else {
_environmentCache = env;
}
@@ -90,16 +90,7 @@ class _Platform {
// Environment variables are case-insensitive on Windows. In order
// to reflect that we use a case-insensitive string map on Windows.
class _CaseInsensitiveStringMap<V> implements Map<String, V> {
- Map<String, V> _map;
-
- _CaseInsensitiveStringMap() : _map = new Map<String, V>();
-
- _CaseInsensitiveStringMap.from(Map<String, V> other)
- : _map = new Map<String, V>() {
- other.forEach((String key, V value) {
- _map[key.toUpperCase()] = value;
- });
- }
+ final Map<String, V> _map = new Map<String, V>();
bool containsKey(String key) => _map.containsKey(key.toUpperCase());
bool containsValue(Object value) => _map.containsValue(value);
@@ -121,4 +112,5 @@ class _CaseInsensitiveStringMap<V> implements Map<String, V> {
int get length => _map.length;
bool get isEmpty => _map.isEmpty;
bool get isNotEmpty => _map.isNotEmpty;
+ String toString() => _map.toString();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698