--- jakarta-struts-1.0.1-src/src/share/org/apache/struts/taglib/logic/IterateTag.java   Wed Jun 13 22:24:28 2001
+++ jakarta-struts-1.0.1-src-mfr/src/share/org/apache/struts/taglib/logic/IterateTag.java Thu Jan 31 09:31:30 2002
@@ -310,9 +310,15 @@


        // Construct an iterator for this collection
-       if (collection.getClass().isArray())
-           collection = Arrays.asList((Object[]) collection);
-       if (collection instanceof Collection)
+       if (collection.getClass().isArray()) {
+               int length = java.lang.reflect.Array.getLength(collection);
+               Collection c = new ArrayList();
+               for(int i=0; i<length; i++) {
+                       c.add(java.lang.reflect.Array.get(collection, i));
+               }
+           iterator = c.iterator();
+       }
+       else if (collection instanceof Collection)
            iterator = ((Collection) collection).iterator();
        else if (collection instanceof Iterator)
            iterator = (Iterator) collection;

