Skip to content

Centralize custom collections support #2619

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

Closed
odrotbohm opened this issue May 3, 2022 · 0 comments
Closed

Centralize custom collections support #2619

odrotbohm opened this issue May 3, 2022 · 0 comments
Assignees
Labels
in: core Issues in core support type: enhancement A general enhancement

Comments

@odrotbohm
Copy link
Member

The general support for custom collection types is currently scattered between TypeDescriptor and QueryExecutionConverters. We should move this into a single place and provide an SPI to potentially even register custom collection types externally.

@odrotbohm odrotbohm added in: core Issues in core support type: enhancement A general enhancement labels May 3, 2022
@odrotbohm odrotbohm added this to the 2.7 GA (2021.2.0) milestone May 3, 2022
@odrotbohm odrotbohm self-assigned this May 3, 2022
odrotbohm added a commit that referenced this issue May 3, 2022
Custom collection support is now centralized in ….util.CustomCollections. It exposes API to detect whether a type is a map or collection, identifies the map base type etc.

Support for different collection implementations is externalized via the CustomCollectionRegistrar SPI that allows to define implementations via spring.factories. The current support for Vavr collections has been moved into an implementation of that, VavrCollections.

Unit tests for custom collection handling and conversion previously living in QueryExecutionConverterUnitTests have been moved into CustomCollectionsUnitTests.

Fixes #2619.
odrotbohm added a commit that referenced this issue May 3, 2022
Removed the removal of the general collection-to-object converter as apparently some downstream Spring Data modules rely on it. This theoretically allows conversions of collections into maps but we now simply don't assume that not to work anymore.

Issue #2619.
odrotbohm added a commit that referenced this issue May 3, 2022
Removed the removal of the general collection-to-object converter as apparently some downstream Spring Data modules rely on it. This theoretically allows conversions of collections into maps but we now simply don't assume that not to work anymore.

Issue #2619.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant