Skip to content

'default-merge' attribute value does not propagate to collection elements [SPR-7656] #12312

@spring-projects-issues

Description

@spring-projects-issues

Chris Beams opened SPR-7656 and commented

collection elements in the beans schema (<list>, <set>, <map>, <props>, <array>) each expose a 'merge' attribute of type 'defaultable-boolean'. All such attributes should also explicitly set default="default", but these elements do not.

This violates expectations during parsing, as the parsing routine expects the default value to be the literal string "default", in which case the parent <beans> element's default values are interrogated as a fallback. Instead, these attributes default to empty string. Thus, if <beans default-merge="true"/> has been set, it never gets propagated to the individual collection elements, because the parsing routine didn't think it was necessary.

This appears to have been the case since as early as Spring 2.0. Apparently there aren't many folks using default-merge!


Affects: 2.0 final

Referenced from: commits c7aaa85

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions