Simplify injection points declaration

This commit simplifies the generics used for SessionRepository and
FindByIdNameSessionRepository as their type signatures already declare
that `S` extends from `Session`.

See gh-39751
This commit is contained in:
Stéphane Nicoll
2024-02-24 16:32:28 +01:00
committed by Scott Frederick
parent ff182d8480
commit 4dfbeaf93f

View File

@@ -54,8 +54,8 @@ public class SessionsEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
SessionsEndpoint sessionEndpoint(SessionRepository<? extends Session> sessionRepository,
ObjectProvider<FindByIndexNameSessionRepository<? extends Session>> indexedSessionRepository) {
SessionsEndpoint sessionEndpoint(SessionRepository<?> sessionRepository,
ObjectProvider<FindByIndexNameSessionRepository<?>> indexedSessionRepository) {
return new SessionsEndpoint(sessionRepository, indexedSessionRepository.getIfAvailable());
}
@@ -68,8 +68,8 @@ public class SessionsEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
ReactiveSessionsEndpoint sessionsEndpoint(ReactiveSessionRepository<? extends Session> sessionRepository,
ObjectProvider<ReactiveFindByIndexNameSessionRepository<? extends Session>> indexedSessionRepository) {
ReactiveSessionsEndpoint sessionsEndpoint(ReactiveSessionRepository<?> sessionRepository,
ObjectProvider<ReactiveFindByIndexNameSessionRepository<?>> indexedSessionRepository) {
return new ReactiveSessionsEndpoint(sessionRepository, indexedSessionRepository.getIfAvailable());
}