findCycle() — spring-boot Function Reference
Architecture documentation for the findCycle() function in BeanCurrentlyInCreationFailureAnalyzer.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 2c67609d_0207_1efd_74fb_a63bdbc433ec["findCycle()"] b173f43d_cf20_26af_3310_afb9c31255be["analyze()"] b173f43d_cf20_26af_3310_afb9c31255be -->|calls| 2c67609d_0207_1efd_74fb_a63bdbc433ec 33a9125c_7711_4cf5_f3b8_006ab34b6194["get()"] 2c67609d_0207_1efd_74fb_a63bdbc433ec -->|calls| 33a9125c_7711_4cf5_f3b8_006ab34b6194 f68a547a_0d93_764b_7125_80c78705be6b["getCause()"] 2c67609d_0207_1efd_74fb_a63bdbc433ec -->|calls| f68a547a_0d93_764b_7125_80c78705be6b 81efee87_cb4c_7bc6_e931_5f88fa562df3["DependencyCycle()"] 2c67609d_0207_1efd_74fb_a63bdbc433ec -->|calls| 81efee87_cb4c_7bc6_e931_5f88fa562df3 style 2c67609d_0207_1efd_74fb_a63bdbc433ec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java lines 75–94
private @Nullable DependencyCycle findCycle(Throwable rootFailure) {
List<BeanInCycle> beansInCycle = new ArrayList<>();
Throwable candidate = rootFailure;
int cycleStart = -1;
while (candidate != null) {
BeanInCycle beanInCycle = BeanInCycle.get(candidate);
if (beanInCycle != null) {
int index = beansInCycle.indexOf(beanInCycle);
if (index == -1) {
beansInCycle.add(beanInCycle);
}
cycleStart = (cycleStart != -1) ? cycleStart : index;
}
candidate = candidate.getCause();
}
if (cycleStart == -1) {
return null;
}
return new DependencyCycle(beansInCycle, cycleStart);
}
Domain
Subdomains
Calls
- DependencyCycle()
- get()
- getCause()
Called By
Source
Frequently Asked Questions
What does findCycle() do?
findCycle() is a function in the spring-boot codebase.
What does findCycle() call?
findCycle() calls 3 function(s): DependencyCycle, get, getCause.
What calls findCycle()?
findCycle() is called by 1 function(s): analyze.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free