Upgrade dependencies; fix compatibility; release

This commit is contained in:
Artem Bilan
2021-05-20 11:18:29 -04:00
parent 537e6f6861
commit fa4f5d7903
3 changed files with 24 additions and 13 deletions

View File

@@ -29,15 +29,15 @@ ext {
assertjVersion = '3.19.0'
awaitilityVersion = '4.0.3'
dynamodbLockClientVersion = '1.1.0'
jacksonVersion = '2.12.2'
junitVersion = '5.7.0'
jacksonVersion = '2.12.3'
junitVersion = '5.7.2'
servletApiVersion = '4.0.1'
localstackVersion = '0.2.6'
localstackVersion = '0.2.11'
log4jVersion = '2.14.1'
springCloudAwsVersion = '2.3.0'
springIntegrationVersion = '5.5.0-SNAPSHOT'
kinesisClientVersion = '1.14.0'
kinesisProducerVersion = '0.14.3'
springCloudAwsVersion = '2.3.1'
springIntegrationVersion = '5.5.0'
kinesisClientVersion = '1.14.3'
kinesisProducerVersion = '0.14.6'
idPrefix = 'aws'
@@ -98,7 +98,7 @@ jacoco {
checkstyle {
configDirectory.set(rootProject.file("src/checkstyle"))
toolVersion = '8.39'
toolVersion = '8.42'
}
dependencies {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2021 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.
@@ -19,6 +19,7 @@ package org.springframework.integration.aws.inbound;
import java.io.File;
import java.io.IOException;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.common.LiteralExpression;
import org.springframework.integration.aws.support.S3Session;
import org.springframework.integration.aws.support.S3SessionFactory;
@@ -27,6 +28,7 @@ import org.springframework.integration.file.remote.session.Session;
import org.springframework.integration.file.remote.session.SessionFactory;
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer;
import org.springframework.integration.metadata.SimpleMetadataStore;
import org.springframework.lang.Nullable;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.S3ObjectSummary;
@@ -73,11 +75,12 @@ public class S3InboundFileSynchronizer extends AbstractInboundFileSynchronizer<S
}
@Override
protected boolean copyFileToLocalDirectory(String remoteDirectoryPath, S3ObjectSummary remoteFile,
protected boolean copyFileToLocalDirectory(String remoteDirectoryPath,
@Nullable EvaluationContext localFileEvaluationContext, S3ObjectSummary remoteFile,
File localDirectory, Session<S3ObjectSummary> session) throws IOException {
return super.copyFileToLocalDirectory(((S3Session) session).normalizeBucketName(remoteDirectoryPath),
remoteFile, localDirectory, session);
localFileEvaluationContext, remoteFile, localDirectory, session);
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2021 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.
@@ -29,8 +29,11 @@ import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.expression.BeanFactoryResolver;
import org.springframework.expression.Expression;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.integration.aws.inbound.S3InboundFileSynchronizer;
import org.springframework.integration.aws.inbound.S3InboundFileSynchronizingMessageSource;
import org.springframework.integration.aws.support.filters.S3PersistentAcceptOnceFileListFilter;
@@ -54,6 +57,9 @@ import org.springframework.util.ReflectionUtils;
@DirtiesContext
class S3InboundChannelAdapterParserTests {
@Autowired
private BeanFactory beanFactory;
@Autowired
private SourcePollingChannelAdapter s3Inbound;
@@ -117,7 +123,9 @@ class S3InboundChannelAdapterParserTests {
genMethod.set(method);
}
});
assertThat(genMethod.get().invoke(fisync, "foo")).isEqualTo("FOO.afoo");
StandardEvaluationContext standardEvaluationContext = new StandardEvaluationContext();
standardEvaluationContext.setBeanResolver(new BeanFactoryResolver(this.beanFactory));
assertThat(genMethod.get().invoke(fisync, "foo", standardEvaluationContext)).isEqualTo("FOO.afoo");
}
}