From e9a3580ef5ef2d2dfcd4b545fc2bf6f7fcf4d029 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 11 Mar 2020 10:22:51 -0400 Subject: [PATCH] Upgrade dependencies; fix new Sonar smells --- build.gradle | 30 +++++++++---------- .../advice/ReactiveRequestHandlerAdvice.java | 6 ++-- .../dsl/RSocketInboundGatewaySpec.java | 8 ++--- .../session/DefaultSftpSessionFactory.java | 19 ++++++------ src/checkstyle/checkstyle.xml | 4 +-- 5 files changed, 32 insertions(+), 35 deletions(-) diff --git a/build.gradle b/build.gradle index c9d987ce90..b0bf1678ba 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ ext { activeMqVersion = '5.15.11' apacheSshdVersion = '2.4.0' - avroVersion = '1.9.1' + avroVersion = '1.9.2' aspectjVersion = '1.9.5' assertjVersion = '3.15.0' assertkVersion = '0.21' @@ -54,23 +54,23 @@ ext { commonsDbcp2Version = '2.7.0' commonsIoVersion = '2.6' commonsNetVersion = '3.6' - curatorVersion = '4.2.0' + curatorVersion = '4.3.0' derbyVersion = '10.14.2.0' ftpServerVersion = '1.1.1' googleJsr305Version = '3.0.2' - groovyVersion = '2.5.9' + groovyVersion = '2.5.10' hamcrestVersion = '2.2' hazelcastVersion = '3.12.6' - hibernateVersion = '5.4.11.Final' + hibernateVersion = '5.4.12.Final' hsqldbVersion = '2.5.0' h2Version = '1.4.200' - jacksonVersion = '2.10.2' + jacksonVersion = '2.10.3' javaxActivationVersion = '1.2.0' javaxMailVersion = '1.6.2' jmsApiVersion = '2.0.1' jpa21ApiVersion = '1.0.2.Final' jpaApiVersion = '2.2.1' - jrubyVersion = '9.2.9.0' + jrubyVersion = '9.2.11.0' jschVersion = '0.1.55' jsonpathVersion = '2.4.0' junit4Version = '4.13' @@ -78,24 +78,24 @@ ext { jythonVersion = '2.7.0' kryoShadedVersion = '4.0.2' lettuceVersion = '5.2.2.RELEASE' - log4jVersion = '2.13.0' + log4jVersion = '2.13.1' micrometerVersion = '1.3.5' - mockitoVersion = '3.2.4' - mongoDriverVersion = '4.0.0-beta1' + mockitoVersion = '3.3.0' + mongoDriverVersion = '4.0.0' mysqlVersion = '8.0.19' pahoMqttClientVersion = '1.2.2' postgresVersion = '42.2.10' - reactorVersion = 'Dysprosium-SR4' + reactorVersion = 'Dysprosium-SR5' resilience4jVersion = '1.3.1' romeToolsVersion = '1.12.2' rsocketVersion = '1.0.0-RC6' servletApiVersion = '4.0.1' smackVersion = '4.3.4' - springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.4.RELEASE' - springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-M3' - springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.3.0.RC1' + springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.5.RELEASE' + springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-M4' + springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.3.0.RELEASE' springRetryVersion = '1.2.5.RELEASE' - springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.3.RELEASE' + springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.4.RELEASE' springWsVersion = '3.0.8.RELEASE' tomcatVersion = "9.0.31" xstreamVersion = '1.4.11.1' @@ -319,7 +319,7 @@ configure(javaProjects) { subproject -> checkstyle { configFile = file("$rootDir/src/checkstyle/checkstyle.xml") - toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.29' + toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.30' } jar { diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/ReactiveRequestHandlerAdvice.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/ReactiveRequestHandlerAdvice.java index a1696bfc76..9c2ba012b6 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/ReactiveRequestHandlerAdvice.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/ReactiveRequestHandlerAdvice.java @@ -18,7 +18,6 @@ package org.springframework.integration.handler.advice; import java.lang.reflect.Method; import java.util.function.BiFunction; -import java.util.function.Function; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; @@ -33,12 +32,13 @@ import reactor.core.publisher.Mono; /** * A {@link MethodInterceptor} for message handlers producing a {@link Mono} as a payload for reply. - * The returned {@link Mono} is customized via {@link Mono#transform(Function)} operator + * The returned {@link Mono} is customized via {@link Mono#transform(java.util.function.Function)} operator * calling provided {@code replyCustomizer} {@link BiFunction} with request message as a context. * * A customization assumes to use supporting reactive operators like {@link Mono#timeout}, * {@link Mono#retry}, {@link Mono#tag} etc. - * A {@link Mono#transform(Function)} also can be used for further customization like reactive circuit breaker. + * A {@link Mono#transform(java.util.function.Function)} also can be used + * for further customization like reactive circuit breaker. * * @author Artem Bilan * diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/RSocketInboundGatewaySpec.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/RSocketInboundGatewaySpec.java index 46479e7476..3d6bf4c06b 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/RSocketInboundGatewaySpec.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/RSocketInboundGatewaySpec.java @@ -23,8 +23,6 @@ import org.springframework.integration.rsocket.RSocketInteractionModel; import org.springframework.integration.rsocket.inbound.RSocketInboundGateway; import org.springframework.messaging.rsocket.RSocketStrategies; -import reactor.core.publisher.Flux; - /** * The {@link MessagingGatewaySpec} implementation for the {@link RSocketInboundGateway}. * @@ -85,8 +83,10 @@ public class RSocketInboundGatewaySpec extends MessagingGatewaySpec, Share * Specifies the filename that will be used for a host key repository. * The file has the same format as OpenSSH's known_hosts file. * @param knownHosts the resource for known hosts. - * @see JSch#setKnownHosts(InputStream) + * @see JSch#setKnownHosts(java.io.InputStream) * @since 5.2.5 */ public void setKnownHostsResource(Resource knownHosts) { @@ -439,8 +438,8 @@ public class DefaultSftpSessionFactory implements SessionFactory, Share } com.jcraft.jsch.Session jschSession = this.jsch.getSession(this.user, this.host, this.port); JavaUtils.INSTANCE - .acceptIfNotNull(this.sessionConfig, jschSession::setConfig) - .acceptIfHasText(this.userInfoWrapper.getPassword(), jschSession::setPassword); + .acceptIfNotNull(this.sessionConfig, jschSession::setConfig) + .acceptIfHasText(this.userInfoWrapper.getPassword(), jschSession::setPassword); jschSession.setUserInfo(this.userInfoWrapper); try { @@ -451,12 +450,12 @@ public class DefaultSftpSessionFactory implements SessionFactory, Share jschSession.setServerAliveInterval(this.serverAliveInterval); } JavaUtils.INSTANCE - .acceptIfNotNull(this.proxy, jschSession::setProxy) - .acceptIfNotNull(this.socketFactory, jschSession::setSocketFactory) - .acceptIfHasText(this.clientVersion, jschSession::setClientVersion) - .acceptIfHasText(this.hostKeyAlias, jschSession::setHostKeyAlias) - .acceptIfNotNull(this.serverAliveCountMax, jschSession::setServerAliveCountMax) - .acceptIfNotNull(this.enableDaemonThread, jschSession::setDaemonThread); + .acceptIfNotNull(this.proxy, jschSession::setProxy) + .acceptIfNotNull(this.socketFactory, jschSession::setSocketFactory) + .acceptIfHasText(this.clientVersion, jschSession::setClientVersion) + .acceptIfHasText(this.hostKeyAlias, jschSession::setHostKeyAlias) + .acceptIfNotNull(this.serverAliveCountMax, jschSession::setServerAliveCountMax) + .acceptIfNotNull(this.enableDaemonThread, jschSession::setDaemonThread); } catch (Exception e) { throw new BeanCreationException("Attempt to set additional properties of " + diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index f3e5782b6e..7d7262aa58 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -14,9 +14,7 @@ - - - +