From be24db70d4ff66302f560e12913f5b71acf3c12c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 21 Oct 2006 23:18:10 +0000 Subject: PR classpath/29086: * java/util/AbstractCollection.java (toArray): Removed cast. --- ChangeLog | 5 +++++ java/util/AbstractCollection.java | 12 +----------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc3686e81..fe554bf01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-21 Tom Tromey + + PR classpath/29086: + * java/util/AbstractCollection.java (toArray): Removed cast. + 2006-10-12 Andrew Haley * java/lang/InheritableThreadLocal.java: Rename NULL to sentinel. diff --git a/java/util/AbstractCollection.java b/java/util/AbstractCollection.java index 7af850b46..ef7434223 100644 --- a/java/util/AbstractCollection.java +++ b/java/util/AbstractCollection.java @@ -416,17 +416,7 @@ public abstract class AbstractCollection Iterator itr = iterator(); for (int pos = 0; pos < size; pos++) - { - try - { - a[pos] = (T) (itr.next()); - } - catch (ClassCastException exception) - { - throw new ArrayStoreException("The element is of the wrong type "+ - "for storing in this array."); - } - } + a[pos] = (T) (itr.next()); return a; } -- cgit v1.2.1