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

Injection points with wildcards are not as lenient as before #32327

Closed
snicoll opened this issue Feb 24, 2024 · 0 comments
Closed

Injection points with wildcards are not as lenient as before #32327

snicoll opened this issue Feb 24, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: task A general task
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Feb 24, 2024

Consider the following interface:

interface SessionRepository<S extends Session> {}

Use as an injection point as follows:

@Configuration
class TestConfiguration {

  @Bean
  SessionEndpoint sessionEndpoint(SessionRepository<? extends Session> sessionRepository) { ... }
}

Work in 6.2.x makes this fail. ResolvableType on the actual instance, resolves SessionRepository as SessionRepository<?>. The current signature looks a bit odd and the repetition of the generic constraints are unnecessary but this didn't use to be a problem.

@snicoll snicoll added type: task A general task in: core Issues in core modules (aop, beans, core, context, expression) labels Feb 24, 2024
@snicoll snicoll added this to the 6.2.0-M1 milestone Feb 24, 2024
@jhoeller jhoeller self-assigned this Feb 24, 2024
@snicoll snicoll changed the title Injection point with wildcards are not as lenient as before Injection points with wildcards are not as lenient as before Feb 24, 2024
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: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants