You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2015/07/29 17:12:23 UTC
[2/3] wicket git commit: WICKET-5898 StackOverflowError after form
submit with a validation error
WICKET-5898 StackOverflowError after form submit with a validation error
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/33879a8b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/33879a8b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/33879a8b
Branch: refs/heads/wicket-6.x
Commit: 33879a8b4842828098bc98665bf1c63ddeb24f2f
Parents: 8c62ecd
Author: Andrea Del Bene <ad...@apache.org>
Authored: Sat May 2 16:50:22 2015 +0200
Committer: Andrea Del Bene (Innoteam) <an...@innoteam.it>
Committed: Wed Jul 29 13:02:16 2015 +0200
----------------------------------------------------------------------
.../markup/html/panel/AbstractMarkupSourcingStrategy.java | 9 ++++++++-
.../queueing/transparentresolvers/TestWicket5898.java | 5 ++---
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/33879a8b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/AbstractMarkupSourcingStrategy.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/AbstractMarkupSourcingStrategy.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/AbstractMarkupSourcingStrategy.java
index e60eaa3..27407cf 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/AbstractMarkupSourcingStrategy.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/AbstractMarkupSourcingStrategy.java
@@ -67,6 +67,13 @@ public abstract class AbstractMarkupSourcingStrategy implements IMarkupSourcingS
@Override
public void component(MarkupContainer resolvingContainer, IVisit<IMarkupFragment> visit)
{
+ //prevents possible searching loops
+ if (child == resolvingContainer)
+ {
+ visit.dontGoDeeper();
+ return;
+ }
+
if (resolvingContainer instanceof IComponentResolver)
{
visit.dontGoDeeper();
@@ -92,7 +99,7 @@ public abstract class AbstractMarkupSourcingStrategy implements IMarkupSourcingS
visit.stop(childMarkup);
}
}
- }
+ }
}
});
}
http://git-wip-us.apache.org/repos/asf/wicket/blob/33879a8b/wicket-core/src/test/java/org/apache/wicket/queueing/transparentresolvers/TestWicket5898.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/queueing/transparentresolvers/TestWicket5898.java b/wicket-core/src/test/java/org/apache/wicket/queueing/transparentresolvers/TestWicket5898.java
index f154948..453e297 100644
--- a/wicket-core/src/test/java/org/apache/wicket/queueing/transparentresolvers/TestWicket5898.java
+++ b/wicket-core/src/test/java/org/apache/wicket/queueing/transparentresolvers/TestWicket5898.java
@@ -18,7 +18,6 @@ package org.apache.wicket.queueing.transparentresolvers;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -69,7 +68,7 @@ public class TestWicket5898
* that might need rewriting.
*/
@Test
- @Ignore("This test fails, should be enabled to trigger WICKET-5898")
+ //@Ignore("This test fails, should be enabled to trigger WICKET-5898")
public void ajaxRequestForComponentInTransparentWebMarkupContainerShouldntCauseStackOverflow()
{
tester.startPage(Wicket5898Page.class);
@@ -89,7 +88,7 @@ public class TestWicket5898
* outer TWMC.
*/
@Test
- @Ignore("This test fails, should be enabled to trigger WICKET-5898")
+ //@Ignore("This test fails, should be enabled to trigger WICKET-5898")
public void ajaxRequestForComponentInTransparentWebMarkupContainerShouldntCauseStackOverflow2()
{
tester.startPage(Wicket5898Page2.class);