diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java index a98ad02fef..a0e52359b9 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -404,7 +404,7 @@ public class MessagingAnnotationPostProcessorTests { @Target({ ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @ServiceActivator(inputChannel = "eventBus") - public static @interface EventHandler { + public @interface EventHandler { } diff --git a/spring-integration-r2dbc/src/main/java/org/springframework/integration/r2dbc/outbound/R2dbcMessageHandler.java b/spring-integration-r2dbc/src/main/java/org/springframework/integration/r2dbc/outbound/R2dbcMessageHandler.java index 9e4bdaac46..b5885392ab 100644 --- a/spring-integration-r2dbc/src/main/java/org/springframework/integration/r2dbc/outbound/R2dbcMessageHandler.java +++ b/spring-integration-r2dbc/src/main/java/org/springframework/integration/r2dbc/outbound/R2dbcMessageHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 the original author or authors. + * Copyright 2020-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -218,6 +218,7 @@ public class R2dbcMessageHandler extends AbstractReactiveMessageHandler { return sqlIdentifierObjectMap; } + @SuppressWarnings("deprecation") private Mono handleInsert(Message message) { if (this.tableNameExpression != null) { String tableName = evaluateTableNameExpression(message); diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueGatewayIntegrationTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueGatewayIntegrationTests.java index b9ed0b56d3..266b3a45c7 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueGatewayIntegrationTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueGatewayIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ public class RedisQueueGatewayIntegrationTests extends RedisAvailableTests { @Before public void setup() { RedisConnectionFactory jcf = getConnectionFactoryForTest(); - jcf.getConnection().del(this.queueName); + jcf.getConnection().keyCommands().del(this.queueName); this.inboundGateway.start(); } diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisOutboundGatewayTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisOutboundGatewayTests.java index f88d49acfd..a687e8f65e 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisOutboundGatewayTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisOutboundGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -126,7 +126,7 @@ public class RedisOutboundGatewayTests extends RedisAvailableTests { @Test @RedisAvailable public void testGetCommand() { - this.setDelCommandChannel.send(MessageBuilder.withPayload(new String[] { "foo", "bar" }) + this.setDelCommandChannel.send(MessageBuilder.withPayload(new String[]{ "foo", "bar" }) .setHeader(RedisHeaders.COMMAND, "SET").build()); Message receive = this.replyChannel.receive(1000); assertThat(receive).isNotNull(); @@ -158,13 +158,13 @@ public class RedisOutboundGatewayTests extends RedisAvailableTests { RedisConnection connection = this.getConnectionFactoryForTest().getConnection(); byte[] value1 = "bar1".getBytes(); byte[] value2 = "bar2".getBytes(); - connection.set("foo1".getBytes(), value1); - connection.set("foo2".getBytes(), value2); - this.mgetCommandChannel.send(MessageBuilder.withPayload(new String[] { "foo1", "foo2" }).build()); + connection.stringCommands().set("foo1".getBytes(), value1); + connection.stringCommands().set("foo2".getBytes(), value2); + this.mgetCommandChannel.send(MessageBuilder.withPayload(new String[]{ "foo1", "foo2" }).build()); Message receive = this.replyChannel.receive(1000); assertThat(receive).isNotNull(); assertThat((List) receive.getPayload()).containsExactly(value1, value2); - connection.del("foo1".getBytes(), "foo2".getBytes()); + connection.keyCommands().del("foo1".getBytes(), "foo2".getBytes()); } }