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

Introduce OptionalToObjectConverter #34544

Closed
sbrannen opened this issue Mar 5, 2025 · 0 comments
Closed

Introduce OptionalToObjectConverter #34544

sbrannen opened this issue Mar 5, 2025 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Mar 5, 2025

Overview

We have an ObjectToOptionalConverter since Spring Framework 4.1; however, we do not have a standard Converter for the inverse.

As discussed in #20433 (comment), it would beneficial to have an OptionalToObjectConverter.

Although its primary use would likely be in SpEL expressions, we should investigate whether it makes sense to register it by default in DefaultConversionService, especially since doing so would allow the OptionalToObjectConverter to be package-private like ObjectToOptionalConverter.

Related Issues

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Mar 5, 2025
@sbrannen sbrannen added this to the 7.0.x milestone Mar 5, 2025
@sbrannen sbrannen self-assigned this Mar 5, 2025
@sbrannen sbrannen modified the milestones: 7.0.x, 7.0.0-M4 Mar 12, 2025
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Mar 27, 2025
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: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant