Fix analyzer hints in pkg/collection.
I plan to release collection 0.9.3+1 once this lands.
R=lrn@google.com
Review URL: https://codereview.chromium.org//308653004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/collection@36814 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5a6381..6c1c554 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.9.3+1
+
+* Fix all analyzer hints.
+
## 0.9.3
* Add a `MapKeySet` class that exposes an unmodifiable `Set` view of a `Map`'s
diff --git a/lib/src/unmodifiable_wrappers.dart b/lib/src/unmodifiable_wrappers.dart
index 022bbfe..72b189c 100644
--- a/lib/src/unmodifiable_wrappers.dart
+++ b/lib/src/unmodifiable_wrappers.dart
@@ -36,7 +36,7 @@
* change the List's length.
*/
abstract class NonGrowableListMixin<E> implements List<E> {
- static void _throw() {
+ static _throw() {
throw new UnsupportedError(
"Cannot change the length of a fixed-length list");
}
@@ -51,9 +51,7 @@
* Throws an [UnsupportedError];
* operations that change the length of the list are disallowed.
*/
- bool add(E value) {
- _throw();
- }
+ bool add(E value) => _throw();
/**
* Throws an [UnsupportedError];
@@ -77,19 +75,19 @@
* Throws an [UnsupportedError];
* operations that change the length of the list are disallowed.
*/
- bool remove(Object value) { _throw(); }
+ bool remove(Object value) => _throw();
/**
* Throws an [UnsupportedError];
* operations that change the length of the list are disallowed.
*/
- E removeAt(int index) { _throw(); }
+ E removeAt(int index) => _throw();
/**
* Throws an [UnsupportedError];
* operations that change the length of the list are disallowed.
*/
- E removeLast() { _throw(); }
+ E removeLast() => _throw();
/**
* Throws an [UnsupportedError];
@@ -141,7 +139,7 @@
* change the Set.
*/
abstract class UnmodifiableSetMixin<E> implements Set<E> {
- void _throw() {
+ _throw() {
throw new UnsupportedError("Cannot modify an unmodifiable Set");
}
@@ -149,9 +147,7 @@
* Throws an [UnsupportedError];
* operations that change the set are disallowed.
*/
- bool add(E value) {
- _throw();
- }
+ bool add(E value) => _throw();
/**
* Throws an [UnsupportedError];
@@ -163,7 +159,7 @@
* Throws an [UnsupportedError];
* operations that change the set are disallowed.
*/
- bool remove(Object value) { _throw(); }
+ bool remove(Object value) => _throw();
/**
* Throws an [UnsupportedError];
@@ -215,7 +211,7 @@
* change the Map.
*/
abstract class UnmodifiableMapMixin<K, V> implements Map<K, V> {
- static void _throw() {
+ static _throw() {
throw new UnsupportedError("Cannot modify an unmodifiable Map");
}
@@ -229,7 +225,7 @@
* Throws an [UnsupportedError];
* operations that change the map are disallowed.
*/
- V putIfAbsent(K key, V ifAbsent()) { _throw(); }
+ V putIfAbsent(K key, V ifAbsent()) => _throw();
/**
* Throws an [UnsupportedError];
@@ -241,7 +237,7 @@
* Throws an [UnsupportedError];
* operations that change the map are disallowed.
*/
- V remove(K key) { _throw(); }
+ V remove(K key) => _throw();
/**
* Throws an [UnsupportedError];
diff --git a/pubspec.yaml b/pubspec.yaml
index e0d1097..80b0972 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: collection
-version: 0.9.3
+version: 0.9.3+1
author: Dart Team <misc@dartlang.org>
description: Collections and utilities functions and classes related to collections.
homepage: http://www.dartlang.org