Skip to content

Commit fa4f5d7

Browse files
committed
Upgrade dependencies; fix compatibility; release
1 parent 537e6f6 commit fa4f5d7

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ ext {
2929
assertjVersion = '3.19.0'
3030
awaitilityVersion = '4.0.3'
3131
dynamodbLockClientVersion = '1.1.0'
32-
jacksonVersion = '2.12.2'
33-
junitVersion = '5.7.0'
32+
jacksonVersion = '2.12.3'
33+
junitVersion = '5.7.2'
3434
servletApiVersion = '4.0.1'
35-
localstackVersion = '0.2.6'
35+
localstackVersion = '0.2.11'
3636
log4jVersion = '2.14.1'
37-
springCloudAwsVersion = '2.3.0'
38-
springIntegrationVersion = '5.5.0-SNAPSHOT'
39-
kinesisClientVersion = '1.14.0'
40-
kinesisProducerVersion = '0.14.3'
37+
springCloudAwsVersion = '2.3.1'
38+
springIntegrationVersion = '5.5.0'
39+
kinesisClientVersion = '1.14.3'
40+
kinesisProducerVersion = '0.14.6'
4141

4242
idPrefix = 'aws'
4343

@@ -98,7 +98,7 @@ jacoco {
9898

9999
checkstyle {
100100
configDirectory.set(rootProject.file("src/checkstyle"))
101-
toolVersion = '8.39'
101+
toolVersion = '8.42'
102102
}
103103

104104
dependencies {

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2021 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.
@@ -19,6 +19,7 @@
1919
import java.io.File;
2020
import java.io.IOException;
2121

22+
import org.springframework.expression.EvaluationContext;
2223
import org.springframework.expression.common.LiteralExpression;
2324
import org.springframework.integration.aws.support.S3Session;
2425
import org.springframework.integration.aws.support.S3SessionFactory;
@@ -27,6 +28,7 @@
2728
import org.springframework.integration.file.remote.session.SessionFactory;
2829
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer;
2930
import org.springframework.integration.metadata.SimpleMetadataStore;
31+
import org.springframework.lang.Nullable;
3032

3133
import com.amazonaws.services.s3.AmazonS3;
3234
import com.amazonaws.services.s3.model.S3ObjectSummary;
@@ -73,11 +75,12 @@ protected long getModified(S3ObjectSummary file) {
7375
}
7476

7577
@Override
76-
protected boolean copyFileToLocalDirectory(String remoteDirectoryPath, S3ObjectSummary remoteFile,
78+
protected boolean copyFileToLocalDirectory(String remoteDirectoryPath,
79+
@Nullable EvaluationContext localFileEvaluationContext, S3ObjectSummary remoteFile,
7780
File localDirectory, Session<S3ObjectSummary> session) throws IOException {
7881

7982
return super.copyFileToLocalDirectory(((S3Session) session).normalizeBucketName(remoteDirectoryPath),
80-
remoteFile, localDirectory, session);
83+
localFileEvaluationContext, remoteFile, localDirectory, session);
8184
}
8285

8386
@Override

src/test/java/org/springframework/integration/aws/config/xml/S3InboundChannelAdapterParserTests.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2021 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.
@@ -29,8 +29,11 @@
2929

3030
import org.junit.jupiter.api.Test;
3131

32+
import org.springframework.beans.factory.BeanFactory;
3233
import org.springframework.beans.factory.annotation.Autowired;
34+
import org.springframework.context.expression.BeanFactoryResolver;
3335
import org.springframework.expression.Expression;
36+
import org.springframework.expression.spel.support.StandardEvaluationContext;
3437
import org.springframework.integration.aws.inbound.S3InboundFileSynchronizer;
3538
import org.springframework.integration.aws.inbound.S3InboundFileSynchronizingMessageSource;
3639
import org.springframework.integration.aws.support.filters.S3PersistentAcceptOnceFileListFilter;
@@ -54,6 +57,9 @@
5457
@DirtiesContext
5558
class S3InboundChannelAdapterParserTests {
5659

60+
@Autowired
61+
private BeanFactory beanFactory;
62+
5763
@Autowired
5864
private SourcePollingChannelAdapter s3Inbound;
5965

@@ -117,7 +123,9 @@ void testS3InboundChannelAdapterComplete() throws Exception {
117123
genMethod.set(method);
118124
}
119125
});
120-
assertThat(genMethod.get().invoke(fisync, "foo")).isEqualTo("FOO.afoo");
126+
StandardEvaluationContext standardEvaluationContext = new StandardEvaluationContext();
127+
standardEvaluationContext.setBeanResolver(new BeanFactoryResolver(this.beanFactory));
128+
assertThat(genMethod.get().invoke(fisync, "foo", standardEvaluationContext)).isEqualTo("FOO.afoo");
121129
}
122130

123131
}

0 commit comments

Comments
 (0)