diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/util/AbstractCollection.java | 12 |
2 files changed, 6 insertions, 11 deletions
@@ -1,3 +1,8 @@ +2006-10-21 Tom Tromey <tromey@redhat.com> + + PR classpath/29086: + * java/util/AbstractCollection.java (toArray): Removed cast. + 2006-10-12 Andrew Haley <aph@redhat.com> * 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<E> Iterator<E> 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; } |