wicket-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcompag...@apache.org
Subject svn commit: r722105 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
Date Mon, 01 Dec 2008 15:57:42 GMT
Author: jcompagner
Date: Mon Dec  1 07:57:41 2008
New Revision: 722105

URL: http://svn.apache.org/viewvc?rev=722105&view=rev
Log:
generics of 1.4 showed that the fix was not really correct because the children list doesnt
have to be a component array but still can be ComponentSourceEntry
So now it really goes through children_get(index)

Modified:
    wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=722105&r1=722104&r2=722105&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
(original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
Mon Dec  1 07:57:41 2008
@@ -18,7 +18,6 @@
 
 import java.util.AbstractList;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
@@ -469,13 +468,15 @@
 				sorted = new ArrayList(1);
 				sorted.add(children);
 			}
-			else if (children instanceof ChildList)
-			{
-				sorted = new ArrayList((ChildList)children);
-			}
 			else
 			{
-				sorted = Arrays.asList((Object[])children);
+				int size = children_size();
+				sorted = new ArrayList(size);
+				for (int i = 0; i < size; i++)
+				{
+					sorted.add(children_get(i));
+				}
+
 			}
 		}
 		Collections.sort(sorted, comparator);



Mime
View raw message