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

Unified Diff: lib/compiler/implementation/lib/constant_map.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: lib/compiler/implementation/lib/constant_map.dart
diff --git a/lib/compiler/implementation/lib/constant_map.dart b/lib/compiler/implementation/lib/constant_map.dart
index 14072133fff9975af94eb7e834659ae8682a9d17..4fe7e37a14f60929e53fc91d54419be551cd899c 100644
--- a/lib/compiler/implementation/lib/constant_map.dart
+++ b/lib/compiler/implementation/lib/constant_map.dart
@@ -40,13 +40,13 @@ class ConstantMap<V> implements Map<String, V> {
String toString() => Maps.mapToString(this);
- _throwImmutable() {
- throw const IllegalAccessException();
+ _throwUnmodifiable() {
+ throw new StateError("Cannot modify unmodifable Map");
floitsch 2012/10/23 12:50:32 unmodifiable
Lasse Reichstein Nielsen 2012/10/24 12:32:15 Done.
}
- void operator []=(String key, V val) => _throwImmutable();
- V putIfAbsent(String key, V ifAbsent()) => _throwImmutable();
- V remove(String key) => _throwImmutable();
- void clear() => _throwImmutable();
+ void operator []=(String key, V val) => _throwUnmodifiable();
+ V putIfAbsent(String key, V ifAbsent()) => _throwUnmodifiable();
+ V remove(String key) => _throwUnmodifiable();
+ void clear() => _throwUnmodifiable();
}
// This class has no constructor. This is on purpose since the instantiation

Powered by Google App Engine
This is Rietveld 408576698