Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bean injection fails due to nullSafeConciseToString() invoking isEmpty() on a Map/Collection proxy #31156

Closed
github-actions bot opened this issue Sep 2, 2023 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: backport An issue that is a backport of another issue to a maintenance branch type: regression A bug that is also a regression
Milestone

Comments

@github-actions
Copy link

github-actions bot commented Sep 2, 2023

Backport of gh-31138

@github-actions github-actions bot added in: core Issues in core modules (aop, beans, core, context, expression) type: backport An issue that is a backport of another issue to a maintenance branch type: regression A bug that is also a regression labels Sep 2, 2023
@github-actions github-actions bot added this to the 5.3.30 milestone Sep 2, 2023
@sbrannen sbrannen self-assigned this Sep 8, 2023
@sbrannen sbrannen changed the title Bean injection fails with 5.3.29 but it works fine with 5.3.27 Bean injection fails due to nullSafeConciseToString() invoking isEmpty() on a Map/Collection proxy Sep 8, 2023
sbrannen added a commit that referenced this issue Sep 8, 2023
gh-30811 introduced explicit support for collections and maps in
ObjectUtils.nullSafeConciseToString() by invoking isEmpty() on a Map or
Collection to determine which concise string representation should be
used. However, this caused a regression in which an exception was
thrown if the Map or Collection was a proxy generated by
AbstractFactoryBean to support <util:set />, <util:list />, and
<util:map /> in XML configuration.

This commit addresses this set of regressions by always returning
"[...]" or "{...}" for a Collection or Map, respectively, disregarding
whether the map is empty or not.

Closes gh-31156
@sbrannen
Copy link
Member

sbrannen commented Sep 8, 2023

Closed via ddcae04

@sbrannen sbrannen closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: backport An issue that is a backport of another issue to a maintenance branch type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

1 participant