You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by th...@apache.org on 2022/03/31 09:34:16 UTC

[wicket] branch master updated: Revert "WICKET-6963 Use singletons for PanelMarkupSourcingStrategy (#503)"

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

theigl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 85fab89  Revert "WICKET-6963 Use singletons for PanelMarkupSourcingStrategy (#503)"
85fab89 is described below

commit 85fab8969a694b46c5b5ea59a37e21f4e0317a00
Author: Thomas Heigl <th...@gmail.com>
AuthorDate: Thu Mar 31 11:34:07 2022 +0200

    Revert "WICKET-6963 Use singletons for PanelMarkupSourcingStrategy (#503)"
    
    This reverts commit 2e3e95f919c9eb08eca8898da7d3b3103a497879.
---
 .../apache/wicket/markup/html/border/BorderPanel.java |  2 +-
 .../wicket/markup/html/form/FormComponentPanel.java   |  2 +-
 .../org/apache/wicket/markup/html/panel/Panel.java    |  2 +-
 .../html/panel/PanelMarkupSourcingStrategy.java       | 19 -------------------
 4 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
index 997372a..c194333 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
@@ -92,7 +92,7 @@ public abstract class BorderPanel extends Panel
 	@Override
 	protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
 	{
-		return PanelMarkupSourcingStrategy.get(true);
+		return new PanelMarkupSourcingStrategy(true);
 	}
 
 	/**
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
index 50c4846..5fe284f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
@@ -146,7 +146,7 @@ public abstract class FormComponentPanel<T> extends FormComponent<T> implements
 	@Override
 	protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
 	{
-		return PanelMarkupSourcingStrategy.get(false);
+		return new PanelMarkupSourcingStrategy(false);
 	}
 
 	@Override
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Panel.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Panel.java
index ba3d9d9..1520c07 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Panel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Panel.java
@@ -81,7 +81,7 @@ public abstract class Panel extends WebMarkupContainer implements IQueueRegion
 	@Override
 	protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
 	{
-		return PanelMarkupSourcingStrategy.get(false);
+		return new PanelMarkupSourcingStrategy(false);
 	}
 	
 	/**
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/PanelMarkupSourcingStrategy.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/PanelMarkupSourcingStrategy.java
index fe0418f..50c80c7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/PanelMarkupSourcingStrategy.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/PanelMarkupSourcingStrategy.java
@@ -33,29 +33,10 @@ import org.apache.wicket.markup.MarkupStream;
  */
 public class PanelMarkupSourcingStrategy extends AssociatedMarkupSourcingStrategy
 {
-	private static final PanelMarkupSourcingStrategy PANEL_INSTANCE = new PanelMarkupSourcingStrategy(
-		false);
-	private static final PanelMarkupSourcingStrategy BORDER_INSTANCE = new PanelMarkupSourcingStrategy(
-		true);
-
 	// False for Panel and true for Border components.
 	private final boolean allowWicketComponentsInBodyMarkup;
 
 	/**
-	 * @param allowWicketComponentsInBodyMarkup
-	 *            {@code false} for Panel and {@code true} for Border components. If Panel then the
-	 *            body markup should only contain raw markup, which is ignored (removed), but no
-	 *            Wicket Component. With Border components, the body markup will be associated with
-	 *            the Body Component.
-	 * 
-	 * @return A singleton of the strategy
-	 */
-	public static PanelMarkupSourcingStrategy get(final boolean allowWicketComponentsInBodyMarkup)
-	{
-		return allowWicketComponentsInBodyMarkup ? BORDER_INSTANCE : PANEL_INSTANCE;
-	}
-
-	/**
 	 * Constructor.
 	 * 
 	 * @param wicketTagName