From bfb2ca217fda0406f710ed06f3e063c9f699de94 Mon Sep 17 00:00:00 2001 From: abilan Date: Fri, 18 Nov 2022 15:47:56 -0500 Subject: [PATCH] Upgrade dependencies including Gradle --- build.gradle | 29 ++++++++--------- gradle/wrapper/gradle-wrapper.properties | 4 +-- .../tcp/connection/TcpMessageMapperTests.java | 31 +++++++++---------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/build.gradle b/build.gradle index 31a2c61f88..ce54f77b52 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = '1.7.20' + ext.kotlinVersion = '1.7.21' ext.isCI = System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey') repositories { mavenCentral() @@ -25,8 +25,8 @@ plugins { id 'io.spring.nohttp' version '0.0.10' apply false id 'org.ajoberstar.grgit' version '4.1.1' id 'io.spring.dependency-management' version '1.1.0' - id 'com.jfrog.artifactory' version '4.29.2' apply false - id 'org.jetbrains.dokka' version "$kotlinVersion" + id 'com.jfrog.artifactory' version '4.29.3' apply false + id 'org.jetbrains.dokka' version '1.7.20' id 'org.asciidoctor.jvm.pdf' version '3.3.2' id 'org.asciidoctor.jvm.gems' version '3.3.2' id 'org.asciidoctor.jvm.convert' version '3.3.2' @@ -55,8 +55,8 @@ ext { modifiedFiles = files(grgit.status().unstaged.modified).filter { f -> f.name.endsWith('.java') || f.name.endsWith('.kt') } - apacheSshdVersion = '2.9.1' - artemisVersion = '2.26.0' + apacheSshdVersion = '2.9.2' + artemisVersion = '2.27.0' aspectjVersion = '1.9.9.1' assertjVersion = '3.23.1' assertkVersion = '0.25' @@ -74,7 +74,7 @@ ext { greenmailVersion = '2.0.0-alpha-2' groovyVersion = '4.0.6' hamcrestVersion = '2.2' - hazelcastVersion = '5.2.0' + hazelcastVersion = '5.2.1' hibernateVersion = '6.1.5.Final' hsqldbVersion = '2.7.1' h2Version = '2.1.214' @@ -96,12 +96,12 @@ ext { mailVersion = '1.0.0' micrometerVersion = '1.10.0' micrometerTracingVersion = '1.0.0' - mockitoVersion = '4.8.1' - mongoDriverVersion = '4.8.0-rc0' + mockitoVersion = '4.9.0' + mongoDriverVersion = '4.8.0' mysqlVersion = '8.0.31' pahoMqttClientVersion = '1.2.5' postgresVersion = '42.5.0' - r2dbch2Version = '1.0.0.RC1' + r2dbch2Version = '1.0.0.RELEASE' reactorVersion = '2022.0.0' resilience4jVersion = '1.7.1' romeToolsVersion = '1.18.0' @@ -109,14 +109,14 @@ ext { servletApiVersion = '6.0.0' smackVersion = '4.4.6' springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '3.0.0-SNAPSHOT' - springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2022.0.0-SNAPSHOT' + springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2022.0.0' springGraphqlVersion = '1.1.0-SNAPSHOT' springKafkaVersion = '3.0.0-SNAPSHOT' - springRetryVersion = '2.0.0-SNAPSHOT' + springRetryVersion = '2.0.0' springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '6.0.0-SNAPSHOT' - springVersion = project.hasProperty('springVersion') ? project.springVersion : '6.0.0-SNAPSHOT' + springVersion = project.hasProperty('springVersion') ? project.springVersion : '6.0.0' springWsVersion = '4.0.0-SNAPSHOT' - testcontainersVersion = '1.17.5' + testcontainersVersion = '1.17.6' tomcatVersion = '10.1.1' xmlUnitVersion = '2.9.0' xstreamVersion = '1.4.19' @@ -709,7 +709,8 @@ project('spring-integration-ip') { } tasks.withType(JavaForkOptions) { - jvmArgs '--add-opens', 'java.base/java.nio.channels.spi=ALL-UNNAMED' + jvmArgs '--add-opens', 'java.base/java.nio.channels.spi=ALL-UNNAMED', + '--add-opens', 'java.base/java.util=ALL-UNNAMED' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 00565ecc28..58cd81206d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionSha256Sum=e5444a57cda4a95f90b0c9446a9e1b47d3d7f69057765bfb54bd4f482542d548 \ No newline at end of file +distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4 \ No newline at end of file diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpMessageMapperTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpMessageMapperTests.java index 2a78943ff5..8e8b73d38d 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpMessageMapperTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpMessageMapperTests.java @@ -27,8 +27,8 @@ import java.util.Map; import javax.net.SocketFactory; import javax.net.ssl.SSLSession; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.core.serializer.DefaultDeserializer; import org.springframework.core.serializer.DefaultSerializer; @@ -48,6 +48,7 @@ import org.springframework.messaging.converter.MessageConverter; import org.springframework.util.MimeType; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -64,14 +65,14 @@ public class TcpMessageMapperTests { private Codec codec; - @Before + @BeforeEach public void setup() { - Map, Codec> codecs = new HashMap, Codec>(); + Map, Codec> codecs = new HashMap<>(); this.codec = new CompositeCodec(codecs, new MessageCodec()); } @Test - public void testToMessage() throws Exception { + public void testToMessage() { TcpMessageMapper mapper = new TcpMessageMapper(); TcpConnection connection = mock(TcpConnection.class); Socket socket = mock(Socket.class); @@ -93,7 +94,7 @@ public class TcpMessageMapperTests { } @Test - public void testToMessageWithContentType() throws Exception { + public void testToMessageWithContentType() { TcpMessageMapper mapper = new TcpMessageMapper(); mapper.setAddContentTypeHeader(true); TcpConnection connection = mock(TcpConnection.class); @@ -119,7 +120,7 @@ public class TcpMessageMapperTests { } @Test - public void testToMessageWithCustomContentType() throws Exception { + public void testToMessageWithCustomContentType() { TcpMessageMapper mapper = new TcpMessageMapper(); mapper.setAddContentTypeHeader(true); mapper.setContentType("application/octet-stream;charset=ISO-8859-1"); @@ -145,17 +146,13 @@ public class TcpMessageMapperTests { assertThat(parseOk.toString()).isEqualTo(message.getHeaders().get(MessageHeaders.CONTENT_TYPE)); } - @Test(expected = IllegalArgumentException.class) + @Test public void testToMessageWithBadContentType() { TcpMessageMapper mapper = new TcpMessageMapper(); mapper.setAddContentTypeHeader(true); - try { - mapper.setContentType(""); - } - catch (IllegalArgumentException e) { - assertThat(e.getMessage()).contains("'contentType' could not be parsed"); - throw e; - } + assertThatIllegalArgumentException() + .isThrownBy(() -> mapper.setContentType("")) + .withMessageContaining("'contentType' could not be parsed"); } @Test @@ -415,7 +412,7 @@ public class TcpMessageMapperTests { } @Test - public void testCodecMessageConvertingBothWaysJava() throws Exception { + public void testCodecMessageConvertingBothWaysJava() { Message outMessage = MessageBuilder.withPayload("foo") .setHeader("bar", "baz") .build(); @@ -439,7 +436,7 @@ public class TcpMessageMapperTests { } @Test - public void testWithBytesMapper() throws Exception { + public void testWithBytesMapper() { Message outMessage = MessageBuilder.withPayload("foo") .setHeader("bar", "baz") .build();