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

Unified Diff: sdk/lib/core/map.dart

Issue 11415028: Remove NullPointerException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed VM bugs. Created 8 years, 1 month 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/core/map.dart
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 58c9bf2f497463092bb8765ad8c58c5e00927e48..e9b52b62afecb220a2bd4348acdda6b19c679972 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -189,7 +189,7 @@ class _HashMapImpl<K, V> implements HashMap<K, V> {
}
int _probeForAdding(K key) {
- if (key == null) throw const NullPointerException();
+ if (key == null) throw new ArgumentError(null);
int hash = _firstProbe(key.hashCode, _keys.length);
int numberOfProbes = 1;
int initialHash = hash;
@@ -224,7 +224,7 @@ class _HashMapImpl<K, V> implements HashMap<K, V> {
}
int _probeForLookup(K key) {
- if (key == null) throw const NullPointerException();
+ if (key == null) throw new ArgumentError(null);
int hash = _firstProbe(key.hashCode, _keys.length);
int numberOfProbes = 1;
int initialHash = hash;

Powered by Google App Engine
This is Rietveld 408576698