Skip to content

Configuration properties containing empty arrays, collections or maps fail with ConverterNotFoundException#50773

Open
xfocus3 wants to merge 1 commit into
spring-projects:mainfrom
xfocus3:fix-gh-50756-empty-map-binding
Open

Configuration properties containing empty arrays, collections or maps fail with ConverterNotFoundException#50773
xfocus3 wants to merge 1 commit into
spring-projects:mainfrom
xfocus3:fix-gh-50756-empty-map-binding

Conversation

@xfocus3

@xfocus3 xfocus3 commented Jun 15, 2026

Copy link
Copy Markdown

Fixes #50756

Map binding now treats an empty direct property value as an explicitly empty map, matching the existing behavior for empty collections and arrays. Non-empty direct values still use the existing scalar conversion path.

Tests:

  • ./gradlew :core:spring-boot:test --tests org.springframework.boot.context.properties.bind.MapBinderTests --tests org.springframework.boot.env.OriginTrackedYamlLoaderTests
  • ./gradlew :core:spring-boot:checkstyleMain :core:spring-boot:checkstyleTest
  • git diff --check

Signed-off-by: Ahmed El amraouiyine <ahmed.elamraouiyine@vilavi.fr>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 15, 2026
@philwebb philwebb changed the title Bind empty strings to empty maps Configuration properties containing empty arrays, collections or maps fail with ConverterNotFoundException Jun 17, 2026
@philwebb philwebb self-assigned this Jun 17, 2026
@philwebb philwebb added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 17, 2026
@philwebb philwebb added this to the 4.1.x milestone Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: regression A regression from a previous release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration properties containing empty arrays, collections or maps fail with ConverterNotFoundException

3 participants