mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 00:09:02 +00:00
Prior to this commit, a SpEL ConstructorReference could reuse a cached ConstructorExecutor even when the current EvaluationContext no longer had any registered ConstructorResolvers, leading to inconsistent behavior if the EvaluationContext changes between evaluations of the same expression. This commit aligns ConstructorReference with the analogous logic in PropertyOrFieldReference by discarding the cached ConstructorExecutor whenever there are no ConstructorResolvers registered in the current EvaluationContext, ensuring that constructor resolution consistently fails with a CONSTRUCTOR_NOT_FOUND exception in that scenario. Closes gh-36985