Update dependencies; prepare for release
* Fix Checkstyle violations for `private` inner classes where they have to be also `final` * Fix deprecations after upgrades * Remove manual coroutines handling in the `GatewayProxyFactoryBean` in favor of the same functionality in the `JdkDynamicProxy`
This commit is contained in:
62
build.gradle
62
build.gradle
@@ -1,5 +1,5 @@
|
||||
buildscript {
|
||||
ext.kotlinVersion = '1.9.0'
|
||||
ext.kotlinVersion = '1.9.10'
|
||||
ext.isCI = System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey')
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
@@ -16,12 +16,12 @@ buildscript {
|
||||
|
||||
plugins {
|
||||
id 'base'
|
||||
id 'org.sonarqube' version '4.3.0.3225'
|
||||
id 'org.sonarqube' version '4.3.1.3277'
|
||||
id 'io.spring.nohttp' version '0.0.11' apply false
|
||||
id 'org.ajoberstar.grgit' version '4.1.1'
|
||||
id 'io.spring.dependency-management' version '1.1.3'
|
||||
id 'com.jfrog.artifactory' version '5.0.3' apply false
|
||||
id 'org.jetbrains.dokka' version '1.8.20'
|
||||
id 'com.jfrog.artifactory' version '5.1.6' apply false
|
||||
id 'org.jetbrains.dokka' version '1.9.0'
|
||||
id 'org.antora' version '1.0.0'
|
||||
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
|
||||
}
|
||||
@@ -51,14 +51,14 @@ ext {
|
||||
}
|
||||
|
||||
apacheSshdVersion = '2.10.0'
|
||||
artemisVersion = '2.29.0'
|
||||
aspectjVersion = '1.9.19'
|
||||
artemisVersion = '2.30.0'
|
||||
aspectjVersion = '1.9.20.1'
|
||||
assertjVersion = '3.24.2'
|
||||
assertkVersion = '0.26.1'
|
||||
assertkVersion = '0.27.0'
|
||||
avroVersion = '1.11.2'
|
||||
awaitilityVersion = '4.2.0'
|
||||
camelVersion = '4.0.0-RC2'
|
||||
commonsDbcp2Version = '2.9.0'
|
||||
camelVersion = '4.0.0'
|
||||
commonsDbcp2Version = '2.10.0'
|
||||
commonsIoVersion = '2.13.0'
|
||||
commonsNetVersion = '3.9.0'
|
||||
curatorVersion = '5.5.0'
|
||||
@@ -66,17 +66,17 @@ ext {
|
||||
derbyVersion = '10.16.1.1'
|
||||
findbugsVersion = '3.0.1'
|
||||
ftpServerVersion = '1.2.0'
|
||||
graalvmVersion = '23.0.0'
|
||||
graalvmVersion = '23.0.1'
|
||||
greenmailVersion = '2.1.0-alpha-2'
|
||||
groovyVersion = '4.0.13'
|
||||
groovyVersion = '4.0.15'
|
||||
hamcrestVersion = '2.2'
|
||||
hazelcastVersion = '5.3.1'
|
||||
hazelcastVersion = '5.3.2'
|
||||
hibernateVersion = '6.2.8.Final'
|
||||
hsqldbVersion = '2.7.2'
|
||||
h2Version = '2.2.220'
|
||||
h2Version = '2.2.224'
|
||||
jacksonVersion = '2.15.2'
|
||||
jaxbVersion = '4.0.3'
|
||||
jcifsVersion = '2.1.35'
|
||||
jcifsVersion = '2.1.36'
|
||||
jeroMqVersion = '0.5.3'
|
||||
jmsApiVersion = '3.1.0'
|
||||
jpaApiVersion = '3.1.0'
|
||||
@@ -85,39 +85,39 @@ ext {
|
||||
junit4Version = '4.13.2'
|
||||
junitJupiterVersion = '5.10.0'
|
||||
jythonVersion = '2.7.3'
|
||||
kotlinCoroutinesVersion = '1.7.2'
|
||||
kotlinCoroutinesVersion = '1.7.3'
|
||||
kryoVersion = '5.5.0'
|
||||
lettuceVersion = '6.2.6.RELEASE'
|
||||
log4jVersion = '2.20.0'
|
||||
mailVersion = '2.0.2'
|
||||
micrometerTracingVersion = '1.2.0-M2'
|
||||
micrometerVersion = '1.12.0-M2'
|
||||
micrometerTracingVersion = '1.2.0-M3'
|
||||
micrometerVersion = '1.12.0-M3'
|
||||
mockitoVersion = '5.5.0'
|
||||
mongoDriverVersion = '4.10.2'
|
||||
mysqlVersion = '8.0.33'
|
||||
pahoMqttClientVersion = '1.2.5'
|
||||
postgresVersion = '42.6.0'
|
||||
protobufVersion = '3.24.1'
|
||||
protobufVersion = '3.24.3'
|
||||
r2dbch2Version = '1.0.0.RELEASE'
|
||||
reactorVersion = '2023.0.0-M2'
|
||||
reactorVersion = '2023.0.0-M3'
|
||||
resilience4jVersion = '2.1.0'
|
||||
romeToolsVersion = '2.1.0'
|
||||
rsocketVersion = '1.1.4'
|
||||
servletApiVersion = '6.0.0'
|
||||
smackVersion = '4.4.6'
|
||||
springAmqpVersion = '3.0.6'
|
||||
springDataVersion = '2023.1.0-M2'
|
||||
springGraphqlVersion = '1.2.2'
|
||||
springKafkaVersion = '3.0.10'
|
||||
springRetryVersion = '2.0.2'
|
||||
springSecurityVersion = '6.2.0-M2'
|
||||
springVersion = '6.1.0-M4'
|
||||
springWsVersion = '4.0.4'
|
||||
testcontainersVersion = '1.18.3'
|
||||
tomcatVersion = '10.1.11'
|
||||
springAmqpVersion = '3.1.0-M1'
|
||||
springDataVersion = '2023.1.0-M3'
|
||||
springGraphqlVersion = '1.2.3'
|
||||
springKafkaVersion = '3.1.0-M1'
|
||||
springRetryVersion = '2.0.3'
|
||||
springSecurityVersion = '6.2.0-M3'
|
||||
springVersion = '6.1.0-M5'
|
||||
springWsVersion = '4.0.6'
|
||||
testcontainersVersion = '1.19.0'
|
||||
tomcatVersion = '10.1.13'
|
||||
xmlUnitVersion = '2.9.1'
|
||||
xstreamVersion = '1.4.20'
|
||||
ztZipVersion = '1.15'
|
||||
ztZipVersion = '1.16'
|
||||
|
||||
javaProjects = subprojects - project(':spring-integration-bom')
|
||||
}
|
||||
@@ -365,7 +365,7 @@ configure(javaProjects) { subproject ->
|
||||
|
||||
checkstyle {
|
||||
configDirectory.set(rootProject.file('src/checkstyle'))
|
||||
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.12.1'
|
||||
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.12.3'
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2022 the original author or authors.
|
||||
* Copyright 2016-2023 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 @@ import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
/**
|
||||
* An utility class to provide methods for out-of-the-box
|
||||
* A utility class to provide methods for out-of-the-box
|
||||
* {@link org.springframework.integration.transformer.Transformer}s.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
@@ -336,7 +336,7 @@ public abstract class Transformers {
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
private static class RequestMessageHolder extends AtomicReference<Message<?>> {
|
||||
private static final class RequestMessageHolder extends AtomicReference<Message<?>> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ import org.springframework.integration.support.channel.ChannelResolverUtils;
|
||||
import org.springframework.integration.support.management.IntegrationManagement;
|
||||
import org.springframework.integration.support.management.TrackableComponent;
|
||||
import org.springframework.integration.support.management.metrics.MetricsCaptor;
|
||||
import org.springframework.integration.util.CoroutinesUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
@@ -597,6 +596,7 @@ public class GatewayProxyFactoryBean<T> extends AbstractEndpoint
|
||||
int paramCount = method.getParameterTypes().length;
|
||||
Object response;
|
||||
boolean hasPayloadExpression = findPayloadExpression(method);
|
||||
|
||||
if (paramCount == 0 && !hasPayloadExpression) {
|
||||
response = receive(gateway, method, !oneWay, shouldReturnMessage);
|
||||
}
|
||||
@@ -604,28 +604,20 @@ public class GatewayProxyFactoryBean<T> extends AbstractEndpoint
|
||||
response = sendOrSendAndReceive(invocation, gateway, shouldReturnMessage, !oneWay);
|
||||
}
|
||||
|
||||
Object continuation = null;
|
||||
if (gateway.isSuspendingFunction) {
|
||||
for (Object argument : invocation.getArguments()) {
|
||||
if (argument != null && CoroutinesUtils.isContinuation(argument)) {
|
||||
continuation = argument;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
return response(gateway.returnType, shouldReturnMessage, response, continuation);
|
||||
return response(gateway.returnType, shouldReturnMessage, response);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Object response(Class<?> returnType, boolean shouldReturnMessage,
|
||||
@Nullable Object response, @Nullable Object continuation) {
|
||||
|
||||
private Object response(Class<?> returnType, boolean shouldReturnMessage, @Nullable Object response) {
|
||||
if (shouldReturnMessage) {
|
||||
return response;
|
||||
}
|
||||
else {
|
||||
return response != null ? convert(response, returnType, continuation) : null;
|
||||
return response != null ? convert(response, returnType) : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1041,23 +1033,19 @@ public class GatewayProxyFactoryBean<T> extends AbstractEndpoint
|
||||
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T convert(Object source, Class<T> expectedReturnType, @Nullable Object continuation) {
|
||||
if (continuation != null) {
|
||||
return CoroutinesUtils.monoAwaitSingleOrNull((Mono<T>) source, continuation);
|
||||
}
|
||||
private <P> P convert(Object source, Class<P> expectedReturnType) {
|
||||
if (Future.class.isAssignableFrom(expectedReturnType)) {
|
||||
return (T) source;
|
||||
return (P) source;
|
||||
}
|
||||
if (Mono.class.isAssignableFrom(expectedReturnType)) {
|
||||
return (T) source;
|
||||
return (P) source;
|
||||
}
|
||||
|
||||
|
||||
return doConvert(source, expectedReturnType);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private <T> T doConvert(Object source, Class<T> expectedReturnType) {
|
||||
private <P> P doConvert(Object source, Class<P> expectedReturnType) {
|
||||
ConversionService conversionService = getConversionService();
|
||||
if (conversionService != null) {
|
||||
return conversionService.convert(source, expectedReturnType);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 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.
|
||||
@@ -349,7 +349,7 @@ public abstract class AbstractMessageSplitter extends AbstractReplyProducingMess
|
||||
protected abstract Object splitMessage(Message<?> message);
|
||||
|
||||
|
||||
private static class JacksonNodeHelper {
|
||||
private static final class JacksonNodeHelper {
|
||||
|
||||
private static boolean isNode(Object object) {
|
||||
return object instanceof TreeNode;
|
||||
|
||||
@@ -435,7 +435,7 @@ public class FileReadingMessageSource extends AbstractMessageSource<File> implem
|
||||
|
||||
}
|
||||
|
||||
private class WatchServiceDirectoryScanner extends DefaultDirectoryScanner implements ManageableLifecycle {
|
||||
private final class WatchServiceDirectoryScanner extends DefaultDirectoryScanner implements ManageableLifecycle {
|
||||
|
||||
private final ConcurrentMap<Path, WatchKey> pathKeys = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2022 the original author or authors.
|
||||
* Copyright 2015-2023 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.
|
||||
@@ -27,7 +27,6 @@ import com.hazelcast.collection.ItemListener;
|
||||
import com.hazelcast.core.DistributedObject;
|
||||
import com.hazelcast.instance.EndpointQualifier;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.hazelcast.map.listener.MapListener;
|
||||
import com.hazelcast.multimap.MultiMap;
|
||||
import com.hazelcast.replicatedmap.ReplicatedMap;
|
||||
import com.hazelcast.topic.ITopic;
|
||||
@@ -67,7 +66,7 @@ public class HazelcastEventDrivenMessageProducer extends AbstractHazelcastMessag
|
||||
protected void doStart() {
|
||||
if (this.distributedObject instanceof IMap) {
|
||||
setHazelcastRegisteredEventListenerId(((IMap<?, ?>) this.distributedObject)
|
||||
.addEntryListener((MapListener) new HazelcastEntryListener(), true));
|
||||
.addEntryListener(new HazelcastEntryListener(), true));
|
||||
}
|
||||
else if (this.distributedObject instanceof MultiMap) {
|
||||
setHazelcastRegisteredEventListenerId(((MultiMap<?, ?>) this.distributedObject)
|
||||
@@ -125,7 +124,7 @@ public class HazelcastEventDrivenMessageProducer extends AbstractHazelcastMessag
|
||||
return "hazelcast:inbound-channel-adapter";
|
||||
}
|
||||
|
||||
private class HazelcastItemListener<E> extends AbstractHazelcastEventListener<ItemEvent<E>>
|
||||
private final class HazelcastItemListener<E> extends AbstractHazelcastEventListener<ItemEvent<E>>
|
||||
implements ItemListener<E> {
|
||||
|
||||
@Override
|
||||
@@ -145,9 +144,7 @@ public class HazelcastEventDrivenMessageProducer extends AbstractHazelcastMessag
|
||||
event.getMember().getSocketAddress(EndpointQualifier.MEMBER), getCacheListeningPolicy());
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received ItemEvent : " + event);
|
||||
}
|
||||
logger.debug(() -> "Received ItemEvent : " + event);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -161,7 +158,7 @@ public class HazelcastEventDrivenMessageProducer extends AbstractHazelcastMessag
|
||||
|
||||
}
|
||||
|
||||
private class HazelcastMessageListener<E> extends AbstractHazelcastEventListener<Message<E>>
|
||||
private final class HazelcastMessageListener<E> extends AbstractHazelcastEventListener<Message<E>>
|
||||
implements MessageListener<E> {
|
||||
|
||||
@Override
|
||||
@@ -174,9 +171,7 @@ public class HazelcastEventDrivenMessageProducer extends AbstractHazelcastMessag
|
||||
sendMessage(event,
|
||||
event.getPublishingMember().getSocketAddress(EndpointQualifier.MEMBER), getCacheListeningPolicy());
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received Message : " + event);
|
||||
}
|
||||
logger.debug(() -> "Received Message : " + event);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -750,7 +750,7 @@ public class JdbcMessageStore extends AbstractMessageGroupStore
|
||||
* Convenience class to be used to unpack a message from a result set row. Uses column named in the result set to
|
||||
* extract the required data, so that select clause ordering is unimportant.
|
||||
*/
|
||||
private class MessageMapper implements RowMapper<Message<?>> {
|
||||
private final class MessageMapper implements RowMapper<Message<?>> {
|
||||
|
||||
@Override
|
||||
public Message<?> mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -552,7 +553,7 @@ public class JdbcMessageStoreTests {
|
||||
PoolableConnectionFactory poolFactory = new PoolableConnectionFactory(connFactory, null);
|
||||
GenericObjectPoolConfig<PoolableConnection> config = new GenericObjectPoolConfig<>();
|
||||
config.setMaxTotal(2);
|
||||
config.setMaxWaitMillis(500);
|
||||
config.setMaxWait(Duration.ofMillis(500));
|
||||
ObjectPool<PoolableConnection> connPool = new GenericObjectPool<>(poolFactory, config);
|
||||
poolFactory.setPool(connPool);
|
||||
PoolingDataSource<PoolableConnection> poolingDataSource = new PoolingDataSource<>(connPool);
|
||||
|
||||
@@ -133,7 +133,7 @@ class MessageSourceIntegrationTests {
|
||||
assertThat(messageHistory.toString()).isEqualTo("myNullChannel");
|
||||
received = source.receive();
|
||||
assertThat(received).isNull();
|
||||
assertThat(KafkaTestUtils.getPropertyValue(source, "consumer.fetcher.minBytes")).isEqualTo(2);
|
||||
assertThat(KafkaTestUtils.getPropertyValue(source, "consumer.fetcher.fetchConfig.minBytes")).isEqualTo(2);
|
||||
source.destroy();
|
||||
template.destroy();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2021 the original author or authors.
|
||||
* Copyright 2015-2023 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.
|
||||
@@ -266,7 +266,7 @@ public class StompInboundChannelAdapter extends MessageProducerSupport implement
|
||||
}
|
||||
}
|
||||
|
||||
private class IntegrationInboundStompSessionHandler extends StompSessionHandlerAdapter {
|
||||
private final class IntegrationInboundStompSessionHandler extends StompSessionHandlerAdapter {
|
||||
|
||||
@Override
|
||||
public void afterConnected(StompSession session, StompHeaders connectedHeaders) {
|
||||
|
||||
@@ -344,7 +344,7 @@ public class LeaderInitiator implements SmartLifecycle {
|
||||
|
||||
}
|
||||
|
||||
private class NullCuratorContext extends CuratorContext {
|
||||
private final class NullCuratorContext extends CuratorContext {
|
||||
|
||||
@Override
|
||||
public boolean isLeader() {
|
||||
|
||||
Reference in New Issue
Block a user