This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 5960e1a6bb28260b24a00e94cc77a52eeb34ac32
Author: helmut8080 <[email protected]>
AuthorDate: Sun Mar 8 06:36:04 2020 +0100

    Iteration stops with nested containers (#403)
    
    WICKET-6754 Since there is only one pop() performed in hasNext() the 
iteration stops, if there are several nested container, when the iteration for 
the first most nested containers is finished and there are no additional childs 
in the parent container.
    
    (cherry picked from commit 2cd731977d9bb957b3e9bff2ecd4b509ac672a2f)
---
 wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 329e503..b74e6fa 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2200,7 +2200,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
                        @Override
                        public boolean hasNext()
                        {
-                               if (!currentIterator.hasNext() && 
!iteratorStack.isEmpty())
+                               while (!currentIterator.hasNext() && 
!iteratorStack.isEmpty())
                                {
                                        currentIterator = iteratorStack.pop();
                                }

Reply via email to