Fix deprecation warnings

This commit is contained in:
Vedran Pavic
2022-08-19 23:55:50 +02:00
committed by Rob Winch
parent 8c49d5993f
commit 8e8de48614
66 changed files with 278 additions and 230 deletions

View File

@@ -26,6 +26,7 @@ import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationListener;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisServerCommands;
import org.springframework.data.redis.connection.SubscriptionListener;
import org.springframework.security.core.session.SessionDestroyedEvent;
import org.springframework.session.MapSession;
@@ -67,9 +68,11 @@ public abstract class AbstractHttpSessionListenerTests {
static RedisConnectionFactory createMockRedisConnection() {
RedisConnectionFactory factory = mock(RedisConnectionFactory.class);
RedisConnection connection = mock(RedisConnection.class);
RedisServerCommands commands = mock(RedisServerCommands.class);
given(factory.getConnection()).willReturn(connection);
given(connection.getConfig(anyString())).willReturn(new Properties());
given(connection.serverCommands()).willReturn(commands);
given(commands.getConfig(anyString())).willReturn(new Properties());
willAnswer((it) -> {
SubscriptionListener listener = it.getArgument(0);