Skip to content

Commit 5cfdaa2

Browse files
committed
Upgrade dependencies, including Gradle
* Migrate to `DEVELOCITY_ACCESS_KEY` secret for GHA * Fix classes compatibility with Java 21
1 parent a8d7534 commit 5cfdaa2

13 files changed

+51
-37
lines changed

.github/workflows/ci-snapshot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
with:
1414
gradleTasks: dist
1515
secrets:
16-
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
16+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1717
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
1818
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
buildToolArgs: dist
1818
secrets:
1919
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
20-
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
20+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2121
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
2222
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
2323
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}

build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ repositories {
2727

2828
ext {
2929
assertjVersion = '3.26.3'
30-
awaitilityVersion = '4.2.1'
30+
awaitilityVersion = '4.2.2'
3131
awsSdkVersion = '2.20.162'
3232
jacksonVersion = '2.15.4'
33-
junitVersion = '5.10.3'
34-
log4jVersion = '2.23.1'
33+
junitVersion = '5.11.0'
34+
log4jVersion = '2.24.0'
3535
servletApiVersion = '6.0.0'
36-
springCloudAwsVersion = '3.0.4'
36+
springCloudAwsVersion = '3.0.5'
3737
springIntegrationVersion = '6.0.9'
3838
kinesisClientVersion = '2.5.8'
39-
kinesisProducerVersion = '0.15.10'
40-
testcontainersVersion = '1.19.8'
39+
kinesisProducerVersion = '0.15.11'
40+
testcontainersVersion = '1.20.1'
4141

4242
idPrefix = 'aws'
4343

@@ -102,7 +102,7 @@ dependencyManagement {
102102

103103
checkstyle {
104104
configDirectory.set(rootProject.file('src/checkstyle'))
105-
toolVersion = '10.12.4'
105+
toolVersion = '10.18.1'
106106
}
107107

108108
dependencies {

gradle/wrapper/gradle-wrapper.jar

79 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionSha256Sum=1541fa36599e12857140465f3c91a97409b4512501c26f9631fb113e392c5bd1
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

publish-maven.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ publishing {
3333
developer {
3434
id = 'artembilan'
3535
name = 'Artem Bilan'
36-
email = 'abilan@vmware.com'
36+
email = 'artem.bilan@broadcom.com'
3737
roles = ['project lead']
3838
}
3939
}

settings.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ pluginManagement {
66
}
77

88
plugins {
9-
id 'com.gradle.develocity' version '3.17.5'
10-
id 'io.spring.develocity.conventions' version '0.0.19'
9+
id 'io.spring.develocity.conventions' version '0.0.21'
1110
}
1211

1312
rootProject.name = 'spring-integration-aws'

src/main/java/org/springframework/integration/aws/inbound/SnsInboundChannelAdapter.java

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2023 the original author or authors.
2+
* Copyright 2016-2024 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.
@@ -80,6 +80,8 @@ public class SnsInboundChannelAdapter extends HttpRequestHandlingMessagingGatewa
8080
private final MappingJackson2HttpMessageConverter jackson2HttpMessageConverter =
8181
new MappingJackson2HttpMessageConverter();
8282

83+
private final String[] path;
84+
8385
private volatile boolean handleNotificationStatus;
8486

8587
private volatile Expression payloadExpression;
@@ -91,17 +93,10 @@ public SnsInboundChannelAdapter(SnsClient amazonSns, String... path) {
9193
Assert.notNull(amazonSns, "'amazonSns' must not be null.");
9294
Assert.notNull(path, "'path' must not be null.");
9395
Assert.noNullElements(path, "'path' must not contain null elements.");
96+
this.path = path;
9497
this.notificationStatusResolver = new NotificationStatusResolver(amazonSns);
95-
RequestMapping requestMapping = new RequestMapping();
96-
requestMapping.setMethods(HttpMethod.POST);
97-
requestMapping.setHeaders("x-amz-sns-message-type");
98-
requestMapping.setPathPatterns(path);
9998
this.jackson2HttpMessageConverter
10099
.setSupportedMediaTypes(Arrays.asList(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN));
101-
super.setRequestMapping(requestMapping);
102-
super.setStatusCodeExpression(new ValueExpression<>(HttpStatus.NO_CONTENT));
103-
super.setMessageConverters(Collections.singletonList(this.jackson2HttpMessageConverter));
104-
super.setRequestPayloadTypeClass(HashMap.class);
105100
}
106101

107102
public void setHandleNotificationStatus(boolean handleNotificationStatus) {
@@ -111,6 +106,14 @@ public void setHandleNotificationStatus(boolean handleNotificationStatus) {
111106
@Override
112107
protected void onInit() {
113108
super.onInit();
109+
RequestMapping requestMapping = new RequestMapping();
110+
requestMapping.setMethods(HttpMethod.POST);
111+
requestMapping.setHeaders("x-amz-sns-message-type");
112+
requestMapping.setPathPatterns(this.path);
113+
super.setStatusCodeExpression(new ValueExpression<>(HttpStatus.NO_CONTENT));
114+
super.setMessageConverters(Collections.singletonList(this.jackson2HttpMessageConverter));
115+
super.setRequestPayloadTypeClass(HashMap.class);
116+
super.setRequestMapping(requestMapping);
114117
if (this.payloadExpression != null) {
115118
this.evaluationContext = createEvaluationContext();
116119
}

src/main/java/org/springframework/integration/aws/inbound/kinesis/KinesisMessageDrivenChannelAdapter.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-2024 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.
@@ -125,8 +125,14 @@ public class KinesisMessageDrivenChannelAdapter extends MessageProducerSupport
125125

126126
private final ExecutorService shardLocksExecutor =
127127
Executors.newSingleThreadExecutor(
128-
new CustomizableThreadFactory(
129-
(getComponentName() == null ? "" : getComponentName()) + "-kinesis-shard-locks-"));
128+
new CustomizableThreadFactory() {
129+
130+
@Override
131+
protected String getDefaultThreadNamePrefix() {
132+
return (getComponentName() == null ? "" : getComponentName()) + "-kinesis-shard-locks-";
133+
}
134+
135+
});
130136

131137
private String consumerGroup = "SpringIntegration";
132138

src/main/java/org/springframework/integration/aws/outbound/AbstractAwsMessageHandler.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-2024 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.
@@ -83,10 +83,16 @@ protected Expression getSendTimeoutExpression() {
8383
* @param headerMapper the {@link HeaderMapper} to map outbound headers.
8484
*/
8585
public void setHeaderMapper(HeaderMapper<H> headerMapper) {
86-
doSetHeaderMapper(headerMapper);
86+
this.headerMapper = headerMapper;
8787
}
8888

89-
protected final void doSetHeaderMapper(HeaderMapper<H> headerMapper) {
89+
/**
90+
* Set a {@link HeaderMapper} to use.
91+
* @param headerMapper the header mapper to set
92+
* @deprecated in favor of {@link #setHeaderMapper(HeaderMapper)} to be called from {@link #onInit()}.
93+
*/
94+
@Deprecated(forRemoval = true, since = "3.0.8")
95+
protected void doSetHeaderMapper(HeaderMapper<H> headerMapper) {
9096
this.headerMapper = headerMapper;
9197
}
9298

src/main/java/org/springframework/integration/aws/outbound/SnsMessageHandler.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2023 the original author or authors.
2+
* Copyright 2016-2024 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.
@@ -98,7 +98,6 @@ public SnsMessageHandler(SnsAsyncClient amazonSns) {
9898
Assert.notNull(amazonSns, "amazonSns must not be null.");
9999
this.amazonSns = amazonSns;
100100
this.topicArnResolver = new CachingTopicArnResolver(new SnsAsyncTopicArnResolver(this.amazonSns));
101-
doSetHeaderMapper(new SnsHeaderMapper());
102101
}
103102

104103
public void setTopicArn(String topicArn) {
@@ -188,13 +187,14 @@ public void setBodyExpression(Expression bodyExpression) {
188187
@Override
189188
protected void onInit() {
190189
super.onInit();
190+
setHeaderMapper(new SnsHeaderMapper());
191191
TypeLocator typeLocator = getEvaluationContext().getTypeLocator();
192-
if (typeLocator instanceof StandardTypeLocator) {
192+
if (typeLocator instanceof StandardTypeLocator standardTypeLocator) {
193193
/*
194194
* Register the 'org.springframework.integration.aws.support' package you
195195
* don't need a FQCN for the 'SnsBodyBuilder'.
196196
*/
197-
((StandardTypeLocator) typeLocator).registerImport("org.springframework.integration.aws.support");
197+
standardTypeLocator.registerImport("org.springframework.integration.aws.support");
198198
}
199199
}
200200

src/main/java/org/springframework/integration/aws/outbound/SqsMessageHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2023 the original author or authors.
2+
* Copyright 2016-2024 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.
@@ -76,7 +76,6 @@ public class SqsMessageHandler extends AbstractAwsMessageHandler<Map<String, Mes
7676
public SqsMessageHandler(SqsAsyncClient amazonSqs) {
7777
Assert.notNull(amazonSqs, "'amazonSqs' must not be null");
7878
this.amazonSqs = amazonSqs;
79-
doSetHeaderMapper(new SqsHeaderMapper());
8079
}
8180

8281
public void setQueue(String queue) {
@@ -149,6 +148,7 @@ public void setMessageConverter(MessageConverter messageConverter) {
149148
@Override
150149
protected void onInit() {
151150
super.onInit();
151+
setHeaderMapper(new SqsHeaderMapper());
152152
if (this.messageConverter == null) {
153153
this.messageConverter = new GenericMessageConverter(getConversionService());
154154
}

src/main/java/org/springframework/integration/aws/support/AwsRequestFailureException.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-2024 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.
@@ -33,7 +33,7 @@ public class AwsRequestFailureException extends MessagingException {
3333

3434
private static final long serialVersionUID = 1L;
3535

36-
private final AwsRequest request;
36+
private final transient AwsRequest request;
3737

3838
public AwsRequestFailureException(Message<?> message, AwsRequest request, Throwable cause) {
3939
super(message, cause);

0 commit comments

Comments
 (0)