Skip to content

Commit 7b4d456

Browse files
committed
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`
1 parent 836193a commit 7b4d456

File tree

11 files changed

+59
-75
lines changed

11 files changed

+59
-75
lines changed

build.gradle

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlinVersion = '1.9.0'
2+
ext.kotlinVersion = '1.9.10'
33
ext.isCI = System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey')
44
repositories {
55
gradlePluginPortal()
@@ -16,12 +16,12 @@ buildscript {
1616

1717
plugins {
1818
id 'base'
19-
id 'org.sonarqube' version '4.3.0.3225'
19+
id 'org.sonarqube' version '4.3.1.3277'
2020
id 'io.spring.nohttp' version '0.0.11' apply false
2121
id 'org.ajoberstar.grgit' version '4.1.1'
2222
id 'io.spring.dependency-management' version '1.1.3'
23-
id 'com.jfrog.artifactory' version '5.0.3' apply false
24-
id 'org.jetbrains.dokka' version '1.8.20'
23+
id 'com.jfrog.artifactory' version '5.1.6' apply false
24+
id 'org.jetbrains.dokka' version '1.9.0'
2525
id 'org.antora' version '1.0.0'
2626
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
2727
}
@@ -51,32 +51,32 @@ ext {
5151
}
5252

5353
apacheSshdVersion = '2.10.0'
54-
artemisVersion = '2.29.0'
55-
aspectjVersion = '1.9.19'
54+
artemisVersion = '2.30.0'
55+
aspectjVersion = '1.9.20.1'
5656
assertjVersion = '3.24.2'
57-
assertkVersion = '0.26.1'
57+
assertkVersion = '0.27.0'
5858
avroVersion = '1.11.2'
5959
awaitilityVersion = '4.2.0'
60-
camelVersion = '4.0.0-RC2'
61-
commonsDbcp2Version = '2.9.0'
60+
camelVersion = '4.0.0'
61+
commonsDbcp2Version = '2.10.0'
6262
commonsIoVersion = '2.13.0'
6363
commonsNetVersion = '3.9.0'
6464
curatorVersion = '5.5.0'
6565
debeziumVersion = '2.3.3.Final'
6666
derbyVersion = '10.16.1.1'
6767
findbugsVersion = '3.0.1'
6868
ftpServerVersion = '1.2.0'
69-
graalvmVersion = '23.0.0'
69+
graalvmVersion = '23.0.1'
7070
greenmailVersion = '2.1.0-alpha-2'
71-
groovyVersion = '4.0.13'
71+
groovyVersion = '4.0.15'
7272
hamcrestVersion = '2.2'
73-
hazelcastVersion = '5.3.1'
73+
hazelcastVersion = '5.3.2'
7474
hibernateVersion = '6.2.8.Final'
7575
hsqldbVersion = '2.7.2'
76-
h2Version = '2.2.220'
76+
h2Version = '2.2.224'
7777
jacksonVersion = '2.15.2'
7878
jaxbVersion = '4.0.3'
79-
jcifsVersion = '2.1.35'
79+
jcifsVersion = '2.1.36'
8080
jeroMqVersion = '0.5.3'
8181
jmsApiVersion = '3.1.0'
8282
jpaApiVersion = '3.1.0'
@@ -85,39 +85,39 @@ ext {
8585
junit4Version = '4.13.2'
8686
junitJupiterVersion = '5.10.0'
8787
jythonVersion = '2.7.3'
88-
kotlinCoroutinesVersion = '1.7.2'
88+
kotlinCoroutinesVersion = '1.7.3'
8989
kryoVersion = '5.5.0'
9090
lettuceVersion = '6.2.6.RELEASE'
9191
log4jVersion = '2.20.0'
9292
mailVersion = '2.0.2'
93-
micrometerTracingVersion = '1.2.0-M2'
94-
micrometerVersion = '1.12.0-M2'
93+
micrometerTracingVersion = '1.2.0-M3'
94+
micrometerVersion = '1.12.0-M3'
9595
mockitoVersion = '5.5.0'
9696
mongoDriverVersion = '4.10.2'
9797
mysqlVersion = '8.0.33'
9898
pahoMqttClientVersion = '1.2.5'
9999
postgresVersion = '42.6.0'
100-
protobufVersion = '3.24.1'
100+
protobufVersion = '3.24.3'
101101
r2dbch2Version = '1.0.0.RELEASE'
102-
reactorVersion = '2023.0.0-M2'
102+
reactorVersion = '2023.0.0-M3'
103103
resilience4jVersion = '2.1.0'
104104
romeToolsVersion = '2.1.0'
105105
rsocketVersion = '1.1.4'
106106
servletApiVersion = '6.0.0'
107107
smackVersion = '4.4.6'
108-
springAmqpVersion = '3.0.6'
109-
springDataVersion = '2023.1.0-M2'
110-
springGraphqlVersion = '1.2.2'
111-
springKafkaVersion = '3.0.10'
112-
springRetryVersion = '2.0.2'
113-
springSecurityVersion = '6.2.0-M2'
114-
springVersion = '6.1.0-M4'
115-
springWsVersion = '4.0.4'
116-
testcontainersVersion = '1.18.3'
117-
tomcatVersion = '10.1.11'
108+
springAmqpVersion = '3.1.0-M1'
109+
springDataVersion = '2023.1.0-M3'
110+
springGraphqlVersion = '1.2.3'
111+
springKafkaVersion = '3.1.0-M1'
112+
springRetryVersion = '2.0.3'
113+
springSecurityVersion = '6.2.0-M3'
114+
springVersion = '6.1.0-M5'
115+
springWsVersion = '4.0.6'
116+
testcontainersVersion = '1.19.0'
117+
tomcatVersion = '10.1.13'
118118
xmlUnitVersion = '2.9.1'
119119
xstreamVersion = '1.4.20'
120-
ztZipVersion = '1.15'
120+
ztZipVersion = '1.16'
121121

122122
javaProjects = subprojects - project(':spring-integration-bom')
123123
}
@@ -365,7 +365,7 @@ configure(javaProjects) { subproject ->
365365

366366
checkstyle {
367367
configDirectory.set(rootProject.file('src/checkstyle'))
368-
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.12.1'
368+
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.12.3'
369369
}
370370

371371
jar {

spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2022 the original author or authors.
2+
* Copyright 2016-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@
4949
import org.springframework.messaging.Message;
5050

5151
/**
52-
* An utility class to provide methods for out-of-the-box
52+
* A utility class to provide methods for out-of-the-box
5353
* {@link org.springframework.integration.transformer.Transformer}s.
5454
*
5555
* @author Artem Bilan
@@ -336,7 +336,7 @@ static <I, O> Flux<Message<O>> transformWithFunction(Publisher<Message<I>> publi
336336

337337

338338
@SuppressWarnings("serial")
339-
private static class RequestMessageHolder extends AtomicReference<Message<?>> {
339+
private static final class RequestMessageHolder extends AtomicReference<Message<?>> {
340340

341341
}
342342

spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
import org.springframework.integration.support.management.IntegrationManagement;
7474
import org.springframework.integration.support.management.TrackableComponent;
7575
import org.springframework.integration.support.management.metrics.MetricsCaptor;
76-
import org.springframework.integration.util.CoroutinesUtils;
7776
import org.springframework.lang.Nullable;
7877
import org.springframework.messaging.Message;
7978
import org.springframework.messaging.MessageChannel;
@@ -597,35 +596,28 @@ private Object invokeGatewayMethod(MethodInvocation invocation, boolean runningO
597596
int paramCount = method.getParameterTypes().length;
598597
Object response;
599598
boolean hasPayloadExpression = findPayloadExpression(method);
599+
600600
if (paramCount == 0 && !hasPayloadExpression) {
601601
response = receive(gateway, method, !oneWay, shouldReturnMessage);
602602
}
603603
else {
604604
response = sendOrSendAndReceive(invocation, gateway, shouldReturnMessage, !oneWay);
605605
}
606606

607-
Object continuation = null;
608607
if (gateway.isSuspendingFunction) {
609-
for (Object argument : invocation.getArguments()) {
610-
if (argument != null && CoroutinesUtils.isContinuation(argument)) {
611-
continuation = argument;
612-
break;
613-
}
614-
}
608+
return response;
615609
}
616610

617-
return response(gateway.returnType, shouldReturnMessage, response, continuation);
611+
return response(gateway.returnType, shouldReturnMessage, response);
618612
}
619613

620614
@Nullable
621-
private Object response(Class<?> returnType, boolean shouldReturnMessage,
622-
@Nullable Object response, @Nullable Object continuation) {
623-
615+
private Object response(Class<?> returnType, boolean shouldReturnMessage, @Nullable Object response) {
624616
if (shouldReturnMessage) {
625617
return response;
626618
}
627619
else {
628-
return response != null ? convert(response, returnType, continuation) : null;
620+
return response != null ? convert(response, returnType) : null;
629621
}
630622
}
631623

@@ -1041,23 +1033,19 @@ protected void doStop() {
10411033

10421034
@Nullable
10431035
@SuppressWarnings("unchecked")
1044-
private <T> T convert(Object source, Class<T> expectedReturnType, @Nullable Object continuation) {
1045-
if (continuation != null) {
1046-
return CoroutinesUtils.monoAwaitSingleOrNull((Mono<T>) source, continuation);
1047-
}
1036+
private <P> P convert(Object source, Class<P> expectedReturnType) {
10481037
if (Future.class.isAssignableFrom(expectedReturnType)) {
1049-
return (T) source;
1038+
return (P) source;
10501039
}
10511040
if (Mono.class.isAssignableFrom(expectedReturnType)) {
1052-
return (T) source;
1041+
return (P) source;
10531042
}
10541043

1055-
10561044
return doConvert(source, expectedReturnType);
10571045
}
10581046

10591047
@Nullable
1060-
private <T> T doConvert(Object source, Class<T> expectedReturnType) {
1048+
private <P> P doConvert(Object source, Class<P> expectedReturnType) {
10611049
ConversionService conversionService = getConversionService();
10621050
if (conversionService != null) {
10631051
return conversionService.convert(source, expectedReturnType);

spring-integration-core/src/main/java/org/springframework/integration/splitter/AbstractMessageSplitter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -349,7 +349,7 @@ public String getComponentType() {
349349
protected abstract Object splitMessage(Message<?> message);
350350

351351

352-
private static class JacksonNodeHelper {
352+
private static final class JacksonNodeHelper {
353353

354354
private static boolean isNode(Object object) {
355355
return object instanceof TreeNode;

spring-integration-file/src/main/java/org/springframework/integration/file/FileReadingMessageSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public enum WatchEventType {
435435

436436
}
437437

438-
private class WatchServiceDirectoryScanner extends DefaultDirectoryScanner implements ManageableLifecycle {
438+
private final class WatchServiceDirectoryScanner extends DefaultDirectoryScanner implements ManageableLifecycle {
439439

440440
private final ConcurrentMap<Path, WatchKey> pathKeys = new ConcurrentHashMap<>();
441441

spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastEventDrivenMessageProducer.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2022 the original author or authors.
2+
* Copyright 2015-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@
2727
import com.hazelcast.core.DistributedObject;
2828
import com.hazelcast.instance.EndpointQualifier;
2929
import com.hazelcast.map.IMap;
30-
import com.hazelcast.map.listener.MapListener;
3130
import com.hazelcast.multimap.MultiMap;
3231
import com.hazelcast.replicatedmap.ReplicatedMap;
3332
import com.hazelcast.topic.ITopic;
@@ -67,7 +66,7 @@ protected void onInit() {
6766
protected void doStart() {
6867
if (this.distributedObject instanceof IMap) {
6968
setHazelcastRegisteredEventListenerId(((IMap<?, ?>) this.distributedObject)
70-
.addEntryListener((MapListener) new HazelcastEntryListener(), true));
69+
.addEntryListener(new HazelcastEntryListener(), true));
7170
}
7271
else if (this.distributedObject instanceof MultiMap) {
7372
setHazelcastRegisteredEventListenerId(((MultiMap<?, ?>) this.distributedObject)
@@ -125,7 +124,7 @@ public String getComponentType() {
125124
return "hazelcast:inbound-channel-adapter";
126125
}
127126

128-
private class HazelcastItemListener<E> extends AbstractHazelcastEventListener<ItemEvent<E>>
127+
private final class HazelcastItemListener<E> extends AbstractHazelcastEventListener<ItemEvent<E>>
129128
implements ItemListener<E> {
130129

131130
@Override
@@ -145,9 +144,7 @@ protected void processEvent(ItemEvent<E> event) {
145144
event.getMember().getSocketAddress(EndpointQualifier.MEMBER), getCacheListeningPolicy());
146145
}
147146

148-
if (logger.isDebugEnabled()) {
149-
logger.debug("Received ItemEvent : " + event);
150-
}
147+
logger.debug(() -> "Received ItemEvent : " + event);
151148
}
152149

153150
@Override
@@ -161,7 +158,7 @@ protected org.springframework.messaging.Message<?> toMessage(ItemEvent<E> event)
161158

162159
}
163160

164-
private class HazelcastMessageListener<E> extends AbstractHazelcastEventListener<Message<E>>
161+
private final class HazelcastMessageListener<E> extends AbstractHazelcastEventListener<Message<E>>
165162
implements MessageListener<E> {
166163

167164
@Override
@@ -174,9 +171,7 @@ protected void processEvent(Message<E> event) {
174171
sendMessage(event,
175172
event.getPublishingMember().getSocketAddress(EndpointQualifier.MEMBER), getCacheListeningPolicy());
176173

177-
if (logger.isDebugEnabled()) {
178-
logger.debug("Received Message : " + event);
179-
}
174+
logger.debug(() -> "Received Message : " + event);
180175
}
181176

182177
@Override

spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcMessageStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ private String getKey(Object input) {
750750
* Convenience class to be used to unpack a message from a result set row. Uses column named in the result set to
751751
* extract the required data, so that select clause ordering is unimportant.
752752
*/
753-
private class MessageMapper implements RowMapper<Message<?>> {
753+
private final class MessageMapper implements RowMapper<Message<?>> {
754754

755755
@Override
756756
public Message<?> mapRow(ResultSet rs, int rowNum) throws SQLException {

spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/JdbcMessageStoreTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.InputStreamReader;
2121
import java.lang.reflect.Method;
2222
import java.sql.Timestamp;
23+
import java.time.Duration;
2324
import java.util.ArrayList;
2425
import java.util.Collection;
2526
import java.util.List;
@@ -552,7 +553,7 @@ public void testMessageGroupStreamNoConnectionPoolLeak() throws NoSuchMethodExce
552553
PoolableConnectionFactory poolFactory = new PoolableConnectionFactory(connFactory, null);
553554
GenericObjectPoolConfig<PoolableConnection> config = new GenericObjectPoolConfig<>();
554555
config.setMaxTotal(2);
555-
config.setMaxWaitMillis(500);
556+
config.setMaxWait(Duration.ofMillis(500));
556557
ObjectPool<PoolableConnection> connPool = new GenericObjectPool<>(poolFactory, config);
557558
poolFactory.setPool(connPool);
558559
PoolingDataSource<PoolableConnection> poolingDataSource = new PoolingDataSource<>(connPool);

spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageSourceIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void onPartitionsAssigned(Collection<TopicPartition> partitions) {
133133
assertThat(messageHistory.toString()).isEqualTo("myNullChannel");
134134
received = source.receive();
135135
assertThat(received).isNull();
136-
assertThat(KafkaTestUtils.getPropertyValue(source, "consumer.fetcher.minBytes")).isEqualTo(2);
136+
assertThat(KafkaTestUtils.getPropertyValue(source, "consumer.fetcher.fetchConfig.minBytes")).isEqualTo(2);
137137
source.destroy();
138138
template.destroy();
139139
}

spring-integration-stomp/src/main/java/org/springframework/integration/stomp/inbound/StompInboundChannelAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2021 the original author or authors.
2+
* Copyright 2015-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -266,7 +266,7 @@ else if (body instanceof Message) {
266266
}
267267
}
268268

269-
private class IntegrationInboundStompSessionHandler extends StompSessionHandlerAdapter {
269+
private final class IntegrationInboundStompSessionHandler extends StompSessionHandlerAdapter {
270270

271271
@Override
272272
public void afterConnected(StompSession session, StompHeaders connectedHeaders) {

spring-integration-zookeeper/src/main/java/org/springframework/integration/zookeeper/leader/LeaderInitiator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public String toString() {
344344

345345
}
346346

347-
private class NullCuratorContext extends CuratorContext {
347+
private final class NullCuratorContext extends CuratorContext {
348348

349349
@Override
350350
public boolean isLeader() {

0 commit comments

Comments
 (0)