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

thiagohp pushed a commit to branch javax
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


The following commit(s) were added to refs/heads/javax by this push:
     new 8f69f59f2 TAP5-2779: trying to avoid an stack overflow error
8f69f59f2 is described below

commit 8f69f59f2cfc6d20dbc6c5c1b26a2a96c911149b
Author: Thiago H. de Paula Figueiredo <thi...@arsmachina.com.br>
AuthorDate: Sat Nov 9 15:29:49 2024 -0300

    TAP5-2779: trying to avoid an stack overflow error
---
 .../tapestry5/internal/services/ComponentDependencyRegistryImpl.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentDependencyRegistryImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentDependencyRegistryImpl.java
index 6c62350e0..24c0b2a89 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentDependencyRegistryImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentDependencyRegistryImpl.java
@@ -201,6 +201,11 @@ public class ComponentDependencyRegistryImpl implements 
ComponentDependencyRegis
     {
         
         final String className = component.getName();
+        
+        if (alreadyProcessed.contains(className)) {
+            return;
+        }
+        
         final Set<Class<?>> furtherDependencies = new HashSet<>();
         Consumer<Class<?>> processClass = furtherDependencies::add;
         Consumer<String> processClassName = s -> {

Reply via email to