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

Unified Diff: sdk/lib/collection/maps.dart

Issue 1390163004: Make MapMixin putIfAbsent use containsKey. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/collection/maps.dart
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
index 2f803883120f8e768b8d9757234104c3ba16e7db..bd2e736a0458a28d292777c9d410427cc411f466 100644
--- a/sdk/lib/collection/maps.dart
+++ b/sdk/lib/collection/maps.dart
@@ -68,7 +68,7 @@ abstract class MapMixin<K, V> implements Map<K, V> {
}
V putIfAbsent(K key, V ifAbsent()) {
- if (keys.contains(key)) {
+ if (containsKey(key)) {
return this[key];
}
return this[key] = ifAbsent();
« 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