Repository navigation
Consider explicitly bound paths visible in QuerydslBindings - #3557
Open
sharanggupta wants to merge 1 commit into
Open
sharanggupta wants to merge 1 commit into
sharanggupta wants to merge 1 commit into
Conversation
QuerydslBindings.getPropertyPath(…) decided path visibility before looking up explicit bindings and did so without knowing the owning type, so a path registered via bind(…) was treated like any unlisted property. With excludeUnlistedProperties(true), or with an allowlist that didn't name the bound path, the binding was hidden although the Javadoc of excludeUnlistedProperties(…) promises that explicitly bound properties stay available. Aliased bindings were not affected, which made the exclusion evaluation inconsistent between aliased and non-aliased bindings. Visibility is now evaluated against the owning type first: a path with an explicit binding is visible unless it has been explicitly excluded, mirroring the existing rule for aliases. Unbound paths keep the previous allowlist/denylist semantics. Closes spring-projects#3547 Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
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.
QuerydslBindings.getPropertyPath(…)evaluated visibility before looking up explicit bindings, and without the owning type, so a path registered viabind(…)was treated like any unlisted property. WithexcludeUnlistedProperties(true)— or an allowlist that doesn't name it — the binding was hidden, although the Javadoc ofexcludeUnlistedProperties(…)says explicitly bound properties stay available. Aliased bindings were unaffected, which made exclusion inconsistent between aliased and non-aliased bindings.Visibility is now checked against the owning type first: an explicitly bound path is visible unless explicitly excluded, mirroring the existing alias rule. Unbound paths keep the previous allowlist/denylist semantics.
Tests: four new unit tests in
QuerydslBindingsUnitTests(three fail onmain, the fourth pins the alias/deny behaviour); full module suite green (3872 tests).Closes #3547