Gh 50831 fix indexed binder oom - #51143
Open
elephant-y wants to merge 1 commit into
Open
Conversation
When a @ConfigurationProperties List element's property holds a non-null default value (such as Optional.empty()), IndexedElementsBinder would loop indefinitely because JavaBeanBinder treated the fallback value as a successfully bound element. This regression was introduced in 4.1.0 where fallback-to-default behavior changed, turning a previously bounded BindException into an OutOfMemoryError. The fix introduces PropertyBinding, a record that captures both the bound value and whether it originated from a configuration source. JavaBeanBinder and ValueObjectBinder now use fromSource() to determine if binding actually occurred, rather than relying on null checks that fail for non-null default values like Optional.empty(). fromSource is determined by checking both direct property match (findProperty) and descendant presence (containsDescendantOf=PRESENT), ensuring indexed and nested properties are correctly recognized as source-bound while non-iterable sources that return UNKNOWN are correctly treated as non-source. See spring-projectsgh-50831 Signed-off-by: yangzhice <a13644015167@qq.com>
elephant-y
force-pushed
the
gh-50831-fix-indexed-binder-oom
branch
from
July 28, 2026 15:18
ab30a70 to
ccbfe7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.