From 6f3b642f73310289e5c52659c54327433bd6ff6c Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 28 Feb 2024 10:59:03 -0500 Subject: [PATCH] Upgrade dependencies to the latest minor versions * Fix deprecation from AssertJ --- build.gradle | 30 +++++++++---------- .../file/aggregator/FileAggregatorTests.java | 10 +++---- .../integration/http/dsl/HttpDslTests.java | 5 ++-- ...pRequestHandlingMessagingGatewayTests.java | 6 ++-- .../JdbcOutboundGatewayParserTests.java | 7 ++--- .../jdbc/store/JdbcMessageStoreTests.java | 8 +++-- .../jms/ActiveMQMultiContextTests.java | 4 +-- .../KafkaProducerMessageHandlerTests.java | 9 +++--- ...igurableMongoDbMessageGroupStoreTests.java | 5 ++-- .../jsr223/PythonScriptExecutorTests.java | 13 ++++---- 10 files changed, 50 insertions(+), 47 deletions(-) diff --git a/build.gradle b/build.gradle index d0e7f15fe9..a9457433d2 100644 --- a/build.gradle +++ b/build.gradle @@ -52,33 +52,33 @@ ext { } modifiedFiles.finalizeValueOnRead() - apacheSshdVersion = '2.11.0' - artemisVersion = '2.31.2' + apacheSshdVersion = '2.12.0' + artemisVersion = '2.32.0' aspectjVersion = '1.9.21.1' - assertjVersion = '3.24.2' + assertjVersion = '3.25.3' assertkVersion = '0.28.0' avroVersion = '1.11.3' awaitilityVersion = '4.2.0' - camelVersion = '4.3.0' + camelVersion = '4.4.0' commonsDbcp2Version = '2.11.0' commonsIoVersion = '2.15.1' commonsNetVersion = '3.10.0' - curatorVersion = '5.5.0' + curatorVersion = '5.6.0' debeziumVersion = '2.5.1.Final' derbyVersion = '10.16.1.1' ftpServerVersion = '1.2.0' graalvmVersion = '23.1.2' greenmailVersion = '2.1.0-alpha-4' - groovyVersion = '5.0.0-alpha-5' + groovyVersion = '4.0.18' hamcrestVersion = '2.2' hazelcastVersion = '5.3.6' hibernateVersion = '6.4.4.Final' hsqldbVersion = '2.7.2' h2Version = '2.2.224' - jacksonVersion = '2.15.4' + jacksonVersion = '2.16.1' jaxbVersion = '4.0.4' jcifsVersion = '2.1.37' - jeroMqVersion = '0.5.4' + jeroMqVersion = '0.6.0' jmsApiVersion = '3.1.0' jpaApiVersion = '3.1.0' jrubyVersion = '9.4.6.0' @@ -86,20 +86,20 @@ ext { junit4Version = '4.13.2' junitJupiterVersion = '5.10.2' jythonVersion = '2.7.3' - kotlinCoroutinesVersion = '1.7.3' - kryoVersion = '5.5.0' + kotlinCoroutinesVersion = '1.8.0' + kryoVersion = '5.6.0' lettuceVersion = '6.3.1.RELEASE' - log4jVersion = '2.22.1' + log4jVersion = '2.23.0' mailVersion = '2.0.2' micrometerTracingVersion = '1.3.0-SNAPSHOT' micrometerVersion = '1.13.0-SNAPSHOT' - mockitoVersion = '5.8.0' + mockitoVersion = '5.10.0' mongoDriverVersion = '4.11.1' - mysqlVersion = '8.2.0' + mysqlVersion = '8.3.0' oracleVersion = '23.3.0.23.09' pahoMqttClientVersion = '1.2.5' postgresVersion = '42.7.2' - protobufVersion = '4.0.0-rc-2' + protobufVersion = '3.25.3' r2dbch2Version = '1.0.0.RELEASE' reactorVersion = '2023.0.3' resilience4jVersion = '2.2.0' @@ -119,7 +119,7 @@ ext { tomcatVersion = '10.1.19' xmlUnitVersion = '2.9.1' xstreamVersion = '1.4.20' - ztZipVersion = '1.16' + ztZipVersion = '1.17' javaProjects = subprojects - project(':spring-integration-bom') } diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/aggregator/FileAggregatorTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/aggregator/FileAggregatorTests.java index d422d26a6c..3fa5403b7c 100644 --- a/spring-integration-file/src/test/java/org/springframework/integration/file/aggregator/FileAggregatorTests.java +++ b/spring-integration-file/src/test/java/org/springframework/integration/file/aggregator/FileAggregatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2022 the original author or authors. + * Copyright 2021-2024 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. @@ -20,8 +20,8 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.util.List; +import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -114,8 +114,7 @@ public class FileAggregatorTests { .doesNotContainKey(IntegrationMessageHeaderAccessor.CORRELATION_ID); assertThat(receive.getPayload()) - .isInstanceOf(List.class) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .contains("SECOND LINE", "LAST LINE", "FIRST LINE"); } @@ -133,8 +132,7 @@ public class FileAggregatorTests { .doesNotContainKey(IntegrationMessageHeaderAccessor.CORRELATION_ID); assertThat(receive.getPayload()) - .isInstanceOf(List.class) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .isEmpty(); } diff --git a/spring-integration-http/src/test/java/org/springframework/integration/http/dsl/HttpDslTests.java b/spring-integration-http/src/test/java/org/springframework/integration/http/dsl/HttpDslTests.java index 627320785d..d0502ee410 100644 --- a/spring-integration-http/src/test/java/org/springframework/integration/http/dsl/HttpDslTests.java +++ b/spring-integration-http/src/test/java/org/springframework/integration/http/dsl/HttpDslTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2023 the original author or authors. + * Copyright 2016-2024 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. @@ -21,6 +21,7 @@ import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; +import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -194,7 +195,7 @@ public class HttpDslTests { assertThat((Map) payload) .hasSize(1) .extracting((map) -> map.get("a1")) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .hasSize(2) .satisfies((list) -> { assertThat(list) diff --git a/spring-integration-http/src/test/java/org/springframework/integration/http/inbound/HttpRequestHandlingMessagingGatewayTests.java b/spring-integration-http/src/test/java/org/springframework/integration/http/inbound/HttpRequestHandlingMessagingGatewayTests.java index bcd2cd01a0..af250f3478 100644 --- a/spring-integration-http/src/test/java/org/springframework/integration/http/inbound/HttpRequestHandlingMessagingGatewayTests.java +++ b/spring-integration-http/src/test/java/org/springframework/integration/http/inbound/HttpRequestHandlingMessagingGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -26,6 +26,7 @@ import java.util.List; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.servlet.http.HttpServletRequest; +import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; @@ -301,8 +302,7 @@ public class HttpRequestHandlingMessagingGatewayTests extends AbstractHttpInboun assertThat(message).isNotNull() .extracting(Message::getPayload) - .isInstanceOf(List.class) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .hasSize(1) .element(0) .isInstanceOf(TestBean.class) diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcOutboundGatewayParserTests.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcOutboundGatewayParserTests.java index 3fadc1c1be..501823f8c2 100644 --- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcOutboundGatewayParserTests.java +++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcOutboundGatewayParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2024 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. @@ -19,12 +19,12 @@ package org.springframework.integration.jdbc.config; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Collections; -import java.util.List; import java.util.Map; import javax.sql.DataSource; import org.apache.commons.logging.Log; +import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -281,8 +281,7 @@ public class JdbcOutboundGatewayParserTests { assertThat(reply) .isNotNull() .extracting(Message::getPayload) - .isInstanceOf(List.class) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .hasSize(1) .element(0) .isInstanceOf(Map.class) diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/JdbcMessageStoreTests.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/JdbcMessageStoreTests.java index d77dd1effd..0dbb779c75 100644 --- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/JdbcMessageStoreTests.java +++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/JdbcMessageStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -38,6 +38,7 @@ import org.apache.commons.dbcp2.PoolingDataSource; import org.apache.commons.pool2.ObjectPool; import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; +import org.assertj.core.api.InstanceOfAssertFactories; import org.hsqldb.HsqlException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -576,7 +577,10 @@ public class JdbcMessageStoreTests { collectionArgumentResolver.resolveArgument(methodParameter, new GenericMessage<>(pooledMessageStore.getMessageGroup(groupId).getMessages())); - assertThat(result).isInstanceOf(Collection.class).asList().hasSize(1).contains("test data"); + assertThat(result) + .asInstanceOf(InstanceOfAssertFactories.LIST) + .hasSize(1) + .contains("test data"); } pooledMessageStore.removeMessageGroup(groupId); diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/ActiveMQMultiContextTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/ActiveMQMultiContextTests.java index a388e7e726..15e0a7d9a8 100644 --- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/ActiveMQMultiContextTests.java +++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/ActiveMQMultiContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2024 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. @@ -49,7 +49,7 @@ public abstract class ActiveMQMultiContextTests { private static final EmbeddedActiveMQ broker = new EmbeddedActiveMQ(); static { - amqFactory.setDeserializationWhiteList(ObjectInputStreamWithClassLoader.CATCH_ALL_WILDCARD); + amqFactory.setDeserializationAllowList(ObjectInputStreamWithClassLoader.CATCH_ALL_WILDCARD); amqFactory.setRetryInterval(0); } diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java index 7e0ce1d680..b7971ba4eb 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2023 the original author or authors. + * Copyright 2016-2024 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. @@ -86,7 +86,6 @@ import org.springframework.messaging.MessagingException; import org.springframework.messaging.PollableChannel; import org.springframework.messaging.support.ErrorMessage; import org.springframework.messaging.support.GenericMessage; -import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionException; import org.springframework.transaction.support.AbstractPlatformTransactionManager; @@ -558,10 +557,10 @@ class KafkaProducerMessageHandlerTests { ProducerFactory pf = mock(ProducerFactory.class); given(pf.transactionCapable()).willReturn(true); willReturn(producer).given(pf).createProducer(isNull()); - PlatformTransactionManager ptm = new KafkaTransactionManager(pf); + KafkaTransactionManager ptm = new KafkaTransactionManager(pf); ContainerProperties props = new ContainerProperties("foo"); props.setGroupId("group"); - props.setTransactionManager(ptm); + props.setKafkaAwareTransactionManager(ptm); props.setAssignmentCommitOption(AssignmentCommitOption.ALWAYS); final KafkaTemplate template = new KafkaTemplate(pf); KafkaMessageListenerContainer container = new KafkaMessageListenerContainer<>(cf, props); @@ -705,7 +704,7 @@ class KafkaProducerMessageHandlerTests { tm.setTransactionIdPrefix("tm.tx.id."); ContainerProperties props = new ContainerProperties("foo"); props.setGroupId("group"); - props.setTransactionManager(tm); + props.setKafkaAwareTransactionManager(tm); props.setAssignmentCommitOption(AssignmentCommitOption.ALWAYS); final KafkaTemplate template = new KafkaTemplate(pf); template.setTransactionIdPrefix("template.tx.id."); diff --git a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java index 4519f8ecde..033c095eb7 100644 --- a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java +++ b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageGroupStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -19,6 +19,7 @@ package org.springframework.integration.mongodb.store; import java.util.List; import java.util.Map; +import org.assertj.core.api.InstanceOfAssertFactories; import org.bson.Document; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -87,7 +88,7 @@ class ConfigurableMongoDbMessageGroupStoreTests extends AbstractMongoDbMessageGr assertThat(receive) .extracting("payload") - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .hasSize(1); } } diff --git a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonScriptExecutorTests.java b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonScriptExecutorTests.java index 1e5c58a656..24aee92df8 100644 --- a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonScriptExecutorTests.java +++ b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonScriptExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2024 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. @@ -19,8 +19,9 @@ package org.springframework.integration.scripting.jsr223; import java.util.HashMap; import java.util.Map; -import org.junit.Before; -import org.junit.Test; +import org.assertj.core.api.InstanceOfAssertFactories; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.python.core.PyTuple; import org.springframework.core.io.ClassPathResource; @@ -41,7 +42,7 @@ public class PythonScriptExecutorTests { private ScriptExecutor executor; - @Before + @BeforeEach public void init() { this.executor = new PythonScriptExecutor(); } @@ -77,7 +78,7 @@ public class PythonScriptExecutorTests { assertThat(obj) .isNotNull() .isInstanceOf(PyTuple.class) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .element(0) .isEqualTo(1); } @@ -93,7 +94,7 @@ public class PythonScriptExecutorTests { assertThat(obj) .isNotNull() .isInstanceOf(PyTuple.class) - .asList() + .asInstanceOf(InstanceOfAssertFactories.LIST) .element(0) .isEqualTo(1); }