Skip to content

Commit

Permalink
Simplify injection points declaration
Browse files Browse the repository at this point in the history
This commit simplifies the generics used for SessionRepository and
FindByIdNameSessionRepository as their type signatures already declare
that `S` extends from `Session`.
  • Loading branch information
snicoll committed Feb 25, 2024
1 parent 0bc5e27 commit d96e091
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static class ServletSessionEndpointConfiguration {

@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());
}

Expand All @@ -68,8 +68,8 @@ static class ReactiveSessionEndpointConfiguration {

@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());
}

Expand Down

0 comments on commit d96e091

Please sign in to comment.