Skip to content

Commit 96bf411

Browse files
committed
Revert "WICKET-6963 Use singletons for PanelMarkupSourcingStrategy (#503)"
This reverts commit 9278637.
1 parent 034f6fb commit 96bf411

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public BorderPanel(final String id, final IModel<?> model)
9292
@Override
9393
protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
9494
{
95-
return PanelMarkupSourcingStrategy.get(true);
95+
return new PanelMarkupSourcingStrategy(true);
9696
}
9797

9898
/**

wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public boolean checkRequired()
146146
@Override
147147
protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
148148
{
149-
return PanelMarkupSourcingStrategy.get(false);
149+
return new PanelMarkupSourcingStrategy(false);
150150
}
151151

152152
@Override

wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Panel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public Panel(final String id, final IModel<?> model)
8181
@Override
8282
protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
8383
{
84-
return PanelMarkupSourcingStrategy.get(false);
84+
return new PanelMarkupSourcingStrategy(false);
8585
}
8686

8787
/**

wicket-core/src/main/java/org/apache/wicket/markup/html/panel/PanelMarkupSourcingStrategy.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,9 @@
3333
*/
3434
public class PanelMarkupSourcingStrategy extends AssociatedMarkupSourcingStrategy
3535
{
36-
private static final PanelMarkupSourcingStrategy PANEL_INSTANCE = new PanelMarkupSourcingStrategy(
37-
false);
38-
private static final PanelMarkupSourcingStrategy BORDER_INSTANCE = new PanelMarkupSourcingStrategy(
39-
true);
40-
4136
// False for Panel and true for Border components.
4237
private final boolean allowWicketComponentsInBodyMarkup;
4338

44-
/**
45-
* @param allowWicketComponentsInBodyMarkup
46-
* {@code false} for Panel and {@code true} for Border components. If Panel then the
47-
* body markup should only contain raw markup, which is ignored (removed), but no
48-
* Wicket Component. With Border components, the body markup will be associated with
49-
* the Body Component.
50-
*
51-
* @return A singleton of the strategy
52-
*/
53-
public static PanelMarkupSourcingStrategy get(final boolean allowWicketComponentsInBodyMarkup)
54-
{
55-
return allowWicketComponentsInBodyMarkup ? BORDER_INSTANCE : PANEL_INSTANCE;
56-
}
57-
5839
/**
5940
* Constructor.
6041
*

0 commit comments

Comments
 (0)