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

GenericTypeResolver returns EmptyType #34328

Closed
cagliostro92 opened this issue Jan 27, 2025 · 3 comments
Closed

GenericTypeResolver returns EmptyType #34328

cagliostro92 opened this issue Jan 27, 2025 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: regression A bug that is also a regression
Milestone

Comments

@cagliostro92
Copy link

After upgrading from spring-core 6.2.0 to 6.2.2, a new bug has surfaced. The method org.springframework.core.GenericTypeResolver#resolveType now returns org.springframework.core.ResolvableType.EmptyType, which is not resolvable by the underlying Jackson library.

I observed that the issue arises because the method resolveType() is being called at this location. It's unclear why this decision was made, but it seems counterintuitive. After checking that resolvedTypeArgument != ResolvableType.NONE, invoking this method still results in a ResolvableType.NONE instance being returned.

If you can provide guidance on this, I would be happy to contribute. Otherwise, thank you in advance for your collaboration!

demo.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 27, 2025
@snicoll snicoll changed the title [CORE] GenericTypeResolver returns EmptyType GenericTypeResolver returns EmptyType Jan 27, 2025
@jhoeller jhoeller added type: regression A bug that is also a regression in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 28, 2025
@jhoeller jhoeller added this to the 6.2.3 milestone Jan 28, 2025
@jhoeller jhoeller self-assigned this Jan 29, 2025
@jhoeller
Copy link
Contributor

This should work with Jackson again now, avoiding empty type exposure through earlier resolution of the type variable bounds.

Could you try the latest 6.2.3 build snapshot if you get the chance?

@cagliostro92
Copy link
Author

@jhoeller it works. 👍

@jhoeller
Copy link
Contributor

Good to hear, thanks for the immediate feedback!

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: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

3 participants