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

Unified Diff: runtime/lib/immutable_map.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ADded test expectations. Created 8 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 | « runtime/lib/growable_array.dart ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/immutable_map.dart
diff --git a/runtime/lib/immutable_map.dart b/runtime/lib/immutable_map.dart
index 3901c11a5279fb1e6d0a56deabc3cb069f397fa8..041291c13ddcffe0f62f4aa62c77af55727e261d 100644
--- a/runtime/lib/immutable_map.dart
+++ b/runtime/lib/immutable_map.dart
@@ -72,19 +72,19 @@ class ImmutableMap<K, V> implements Map<K, V> {
}
void operator []=(K key, V value) {
- throw const IllegalAccessException();
+ throw new UnsupportedError("Cannot set value in unmodifiable Map");
}
V putIfAbsent(K key, V ifAbsent()) {
- throw const IllegalAccessException();
+ throw new UnsupportedError("Cannot set value in unmodifiable Map");
}
void clear() {
- throw const IllegalAccessException();
+ throw new UnsupportedError("Cannot clear unmodifiable Map");
}
V remove(K key) {
- throw const IllegalAccessException();
+ throw new UnsupportedError("Cannot remove from unmodifiable Map");
}
String toString() {
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698