Skip to content

Limit bracket depth in PropertyEditorRegistrySupport's addStrippedPropertyPaths()Β #37020

Closed

Description

@sbrannen

Currently, addStrippedPropertyPaths() recursively enumerates all subsets of [key] segments in a property path, producing 2^n βˆ’ 1 stripped path variants for a path with n bracket pairs, and both callers (findCustomEditor() and guessPropertyTypeFromEditors()) build the full list eagerly before iterating it.

Since property paths with more than a few bracket segments likely do not exist in real-life applications, we can probably revise addStrippedPropertyPaths() so that it short-circuits when the bracket-segment count exceeds a small limit, such as 8, thereby retaining existing behavior for all realistic inputs while rejecting nesting depths greater than the limit.

NOTE: This issue is assigned and therefore not suitable for community contributions.

Activity

  1. added this to the 7.1.x milestone on Jul 8, 2026
  2. self-assigned this
    on Jul 8, 2026
  3. added
    in: coreIssues in core modules (aop, beans, core, context, expression)
    on Jul 8, 2026
  4. modified the milestones: 7.1.x, 7.1.0-M2 on Aug 26, 2026
  5. added a commit that references this issue on Aug 26, 2026
    6e9534d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions