Improve failure mode when depends-on cycles exist [SPR-7966] #12621
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Archie Cobbs opened SPR-7966 and commented
I had an application context containing a bogus cyclic dependency like this:
Obviously this is misconfigured. But the error message you get from Spring is a
StackOverflowError
:This failure mode could be improved to better indicate the source of the problem.
Doing so could be implemented easily e.g. by keeping track as the dependency graph is explored of the members in the current dependency path in a
ThreadLocal<HashMap>
.Affects: 3.0.5
Issue Links:
Referenced from: commits e48c315, bd84699
The text was updated successfully, but these errors were encountered: