struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r721947 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/MakeIterator.java
Date Mon, 01 Dec 2008 02:25:47 GMT
Author: wesw
Date: Sun Nov 30 18:25:47 2008
New Revision: 721947

URL: http://svn.apache.org/viewvc?rev=721947&view=rev
Log:
changing MakeIterator to support Iterable instead of Collection
per WW-2887, thanks for the patch Mathias Bogaert

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/MakeIterator.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/MakeIterator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/MakeIterator.java?rev=721947&r1=721946&r2=721947&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/MakeIterator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/MakeIterator.java Sun
Nov 30 18:25:47 2008
@@ -50,7 +50,7 @@
 
         if (object instanceof Map) {
             return true;
-        } else if (object instanceof Collection) {
+        } else if (object instanceof Iterable) {
             return true;
         } else if (object.getClass().isArray()) {
             return true;
@@ -78,8 +78,8 @@
             return null;
         }
 
-        if (value instanceof Collection) {
-            iterator = ((Collection) value).iterator();
+        if (value instanceof Iterable) {
+            iterator = ((Iterable) value).iterator();
         } else if (value.getClass().isArray()) {
             //need ability to support primitives; therefore, cannot
             //use Object[] casting.



Mime
View raw message