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

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

Issue 11417058: Revert "Remove NullPointerException." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « sdk/lib/core/exceptions.dart ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/map.dart
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index e9b52b62afecb220a2bd4348acdda6b19c679972..58c9bf2f497463092bb8765ad8c58c5e00927e48 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 new ArgumentError(null);
+ if (key == null) throw const NullPointerException();
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 new ArgumentError(null);
+ if (key == null) throw const NullPointerException();
int hash = _firstProbe(key.hashCode, _keys.length);
int numberOfProbes = 1;
int initialHash = hash;
« no previous file with comments | « sdk/lib/core/exceptions.dart ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698