[ 
https://issues.apache.org/jira/browse/WICKET-6963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525170#comment-17525170
 ] 

ASF GitHub Bot commented on WICKET-6963:
----------------------------------------

theigl opened a new pull request, #517:
URL: https://github.com/apache/wicket/pull/517

   This is my second attempt at using a singleton PanelMarkupSourcingStrategy 
for panels and borders.
   
   My initial PR #503 had to be reverted, because I overlooked the non-final 
field `AssociatedMarkupSourcingStrategy#noMoreWicketHeadTagsAllowed` resulting 
in concurrency issues.
   
   The field is questionable and the code related to it full of TODO and Why? 
comments. This PR gets rid of it. We have nearly two dozen tests for this code 
in HeaderSectionTest and the only result of deleting the field is a different 
error message in one of these tests.
   
   The error message for the test changes from:
    
   > \<wicket:head> tags are only allowed before \<body>, \</head>, 
\<wicket:panel> etc. tag
   
   to the following message thrown from HtmlHeaderResolver: 
   
   > Mis-placed \<wicket:head>. \<wicket:head> must be outside of 
\<wicket:panel>, \<wicket:border>, and <wicket:extend>
   
   Since the flag is used for validation only, this change cannot break 
existing code.
   
   https://issues.apache.org/jira/browse/WICKET-6963




> Use singletons for PanelMarkupSourcingStrategy
> ----------------------------------------------
>
>                 Key: WICKET-6963
>                 URL: https://issues.apache.org/jira/browse/WICKET-6963
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 9.8.0
>            Reporter: Thomas Heigl
>            Assignee: Thomas Heigl
>            Priority: Major
>             Fix For: 10.0.0, 9.9.0, 9.9.1
>
>         Attachments: image-2022-03-21-18-21-51-613.png
>
>
> My latest heapdump contained millions of instances of 
> {{{}PanelMarkupSourcingStrategy{}}}:
> !image-2022-03-21-18-21-51-613.png|width=839,height=24!
> This class is completely stateless and only takes a single boolean 
> constructor parameter. We should replace current instances by a factory 
> method and two singletons.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to