Skip to content

GH-2298 - Read empty collections as empty values#3367

Open
won-seoop wants to merge 1 commit into
spring-projects:mainfrom
won-seoop:2298-empty-collections
Open

GH-2298 - Read empty collections as empty values#3367
won-seoop wants to merge 1 commit into
spring-projects:mainfrom
won-seoop:2298-empty-collections

Conversation

@won-seoop
Copy link
Copy Markdown

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

This change makes MappingRedisConverter return empty collection instances instead of null when reading collection properties that have no mapped elements. This covers empty List and Set properties and keeps array handling unchanged.

Closes #2298

Tested with:

./mvnw -Dtest=MappingRedisConverterUnitTests test

@won-seoop won-seoop force-pushed the 2298-empty-collections branch from 6fa2db4 to 9de69f6 Compare May 20, 2026 09:05
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 20, 2026
Signed-off-by: Hyeonseop Won <dongjin778@naver.com>
@won-seoop won-seoop force-pushed the 2298-empty-collections branch from 9de69f6 to 9b5aa1a Compare May 20, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MappingRedisConverter deserializes collections as nulls if it is empty

2 participants