Avoid infinite loop when cycle in hierarchy#1
Conversation
In certain cases, cycles in the components hierarchy appear. Due to the current implementation an infinite loop is generated and the thread hogs the CPU. The only option is to kill the JVM. The proposed change avoids this situation.
|
Thanks for the PR. Please change it to point to the master branch. Do you have a test case to reproduce the issue? I'm asking because we don't have active trinidad developers currently and this would make it easier to review. |
|
Had a look in the master branch and the code seems a lot changed between these versions. Regarding the test case I have a dummy one as I did not manage yet to catch the one from the customer environment, given the high degree of customizations they have. Let's say we have a page like this: and the button bean looks like this: `package net.orlat84; import javax.faces.component.UIComponent; public class InfiniteLoopBean { } |
In certain cases, cycles in the components hierarchy appear. Due to the current implementation an infinite loop is generated and the thread hogs the CPU. The only option is to kill the JVM.
The proposed change avoids this situation.