mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 03:52:00 +00:00
Prior to this commit, `DataBinder` and the property accessor hierarchy relied on `PropertyAccessorUtils` and several independent scanners for property paths. This commit migrates all of them to `PropertyPath`, so there is exactly one parser deciding what a well-formed property path is, used identically for policy checks and for actual navigation. This removes long standing protected methods like A`getPropertyAccessorForPropertyPathi` and `getFinalPath` from `bstractNestablePropertyAccessor`. The path is now parsed exactly once per public entry point, via the new `resolvePropertyPath`, which returns a `ResolvedProperty`. Then, property navigation walks the parsed segment list rather than re-scanning partial strings. Any subclass overriding the removed method will need to adapt. This removal initially conflicted with gh-37252 (maxNestedPathDepth support). The public configuration remains but the actual behavior changed; it is replaced with `PropertyPath.Options` which enforces limit right after parsing, before property navigation begins. The exception thrown changes from `InvalidPropertyException` to `InvalidPropertyPathException`. This commmit also reverts the `map[']` / `map["]` quoting behavior from gh-36765 as it is incompatible with the new grammar. See gh-37275