You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mo...@apache.org on 2015/11/29 17:05:45 UTC

[19/33] wicket git commit: WICKET-6036 Failure to process markup with nested tags inside a Label

WICKET-6036 Failure to process markup with nested tags inside a Label

Move the new test from ComponentQueueingCompatibilityTest to ComponentQueueingTest.
Fix the exception message.
Remove some trailing spaces.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/6970a4da
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/6970a4da
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/6970a4da

Branch: refs/heads/lambdas
Commit: 6970a4dadb5d1b3b73b8be63d1f321e61967ff13
Parents: 53c982d
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Nov 18 23:28:41 2015 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Nov 18 23:28:41 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/wicket/MarkupContainer.java |  5 ++-
 .../markup/parser/filter/HtmlHandler.java       |  2 +-
 .../ComponentQueueingCompatibilityTest.java     | 33 --------------------
 .../wicket/queueing/ComponentQueueingTest.java  | 11 ++++++-
 4 files changed, 13 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/6970a4da/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
----------------------------------------------------------------------
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 b3c4300..8d08b77 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2005,7 +2005,7 @@ public abstract class MarkupContainer extends Component implements Iterable<Comp
 
 				if (child != null)
 				{
-					addDequeuedComponent(child, tag);					
+					addDequeuedComponent(child, tag);
 				}
 			}
 
@@ -2059,8 +2059,7 @@ public abstract class MarkupContainer extends Component implements Iterable<Comp
 			}
 		} while ((close = dequeue.takeTag()) != null);
 
-		throw new IllegalStateException(String.format(
-				"Could not find the closing for '%s'", tag));
+		throw new IllegalStateException(String.format("Could not find the closing tag for '%s'", tag));
 	}
 
     /** @see IQueueRegion#newDequeueContext() */

http://git-wip-us.apache.org/repos/asf/wicket/blob/6970a4da/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
index 9288409..c5c6f89 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
@@ -110,7 +110,7 @@ public final class HtmlHandler extends AbstractMarkupFilter
 		    setContainsWicketIdFlag(tag);
 		    
 			// Push onto stack
-			stack.push(tag);			
+			stack.push(tag);
 		}
 		else if (tag.isClose())
 		{

http://git-wip-us.apache.org/repos/asf/wicket/blob/6970a4da/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingCompatibilityTest.java b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingCompatibilityTest.java
deleted file mode 100644
index 7cc703b..0000000
--- a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingCompatibilityTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.queueing;
-
-import org.apache.wicket.util.tester.WicketTestCase;
-import org.junit.Test;
-
-public class ComponentQueueingCompatibilityTest extends WicketTestCase
-{
-	/**
-	 * https://issues.apache.org/jira/browse/WICKET-6036
-	 */
-	@Test
-	public void nestedTags()
-	{
-		IncorrectCloseTagPanel p = new IncorrectCloseTagPanel("test");
-		tester.startComponentInPage(p);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/6970a4da/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 463999d..3039a27 100644
--- a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -19,7 +19,6 @@ package org.apache.wicket.queueing;
 import static org.apache.wicket.queueing.WicketMatchers.hasPath;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.*;
 
 import java.util.ArrayList;
 
@@ -723,6 +722,16 @@ public class ComponentQueueingTest extends WicketTestCase
 		tester.assertContains("title");
 	}
 
+	/**
+	 * https://issues.apache.org/jira/browse/WICKET-6036
+	 */
+	@Test
+	public void nestedTags()
+	{
+		IncorrectCloseTagPanel p = new IncorrectCloseTagPanel("test");
+		tester.startComponentInPage(p);
+	}
+
 	private static class A extends WebMarkupContainer
 	{
 		public A()