Skip to content

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

Closed
@snicoll

Description

@snicoll

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions