--- old/src/share/classes/java/util/AbstractCollection.java 2011-12-03 15:57:48.527389647 +0100 +++ new/src/share/classes/java/util/AbstractCollection.java 2011-12-03 15:57:48.387389658 +0100 @@ -170,6 +170,7 @@ * @throws ArrayStoreException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @SuppressWarnings("unchecked") public T[] toArray(T[] a) { // Estimate size of array; be prepared to see more or fewer elements int size = size(); @@ -208,6 +209,7 @@ * @return array containing the elements in the given array, plus any * further elements returned by the iterator, trimmed to size */ + @SuppressWarnings("unchecked") private static T[] finishToArray(T[] r, Iterator it) { int i = r.length; while (it.hasNext()) {