You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use depth-aware bracket parsing in PropertyAccessorUtils #36999
The canonicalPropertyName() method in PropertyAccessorUtils currently uses a simple indexOf("]") check to locate the end of a bracket key expression; whereas, getPropertyNameKeyEnd() in AbstractNestablePropertyAccessor tracks bracket nesting depth. This means the two methods can disagree on the canonical form of a property path whose map key itself contains bracket characters (e.g., map['key[0]']).
Although the use of map keys containing brackets is not documented as a supported use case, for consistency we should update canonicalPropertyName() to use depth-aware bracket parsing analogous to getPropertyNameKeyEnd(), so that the canonical form it produces is always consistent with how the property accessor resolves the same path.
Similarly, getNestedPropertySeparatorIndex() currently tracks whether a dot separator occurs inside a bracket key expression using a simple boolean toggle that flips on both [ and ]. This works correctly when a map key contains a balanced number of inner bracket pairs (since the extra toggles cancel out), but produces an incorrect result when the key contains an odd net count of inner bracket characters. To address that, we should update the method to track bracket nesting depth rather than using a boolean toggle, analogous to getPropertyNameKeyEnd().
NOTE: This issue is assigned and therefore not suitable for community contributions.
changed the title [-]Use depth-aware bracket parsing for canonical property names in `PropertyAccessorUtils`[/-][+]Use depth-aware bracket parsing in `PropertyAccessorUtils`[/+]on Jul 2, 2026
Activity
[-]Use depth-aware bracket parsing for canonical property names in `PropertyAccessorUtils`[/-][+]Use depth-aware bracket parsing in `PropertyAccessorUtils`[/+]Use depth-aware bracket parsing in PropertyAccessorUtils
Eagerly reject property paths with unbalanced brackets