Upgrade dependencies; fix new Sonar smells

This commit is contained in:
Artem Bilan
2020-03-11 10:22:51 -04:00
parent 6b82681cc0
commit e9a3580ef5
5 changed files with 32 additions and 35 deletions

View File

@@ -46,7 +46,7 @@ ext {
activeMqVersion = '5.15.11' activeMqVersion = '5.15.11'
apacheSshdVersion = '2.4.0' apacheSshdVersion = '2.4.0'
avroVersion = '1.9.1' avroVersion = '1.9.2'
aspectjVersion = '1.9.5' aspectjVersion = '1.9.5'
assertjVersion = '3.15.0' assertjVersion = '3.15.0'
assertkVersion = '0.21' assertkVersion = '0.21'
@@ -54,23 +54,23 @@ ext {
commonsDbcp2Version = '2.7.0' commonsDbcp2Version = '2.7.0'
commonsIoVersion = '2.6' commonsIoVersion = '2.6'
commonsNetVersion = '3.6' commonsNetVersion = '3.6'
curatorVersion = '4.2.0' curatorVersion = '4.3.0'
derbyVersion = '10.14.2.0' derbyVersion = '10.14.2.0'
ftpServerVersion = '1.1.1' ftpServerVersion = '1.1.1'
googleJsr305Version = '3.0.2' googleJsr305Version = '3.0.2'
groovyVersion = '2.5.9' groovyVersion = '2.5.10'
hamcrestVersion = '2.2' hamcrestVersion = '2.2'
hazelcastVersion = '3.12.6' hazelcastVersion = '3.12.6'
hibernateVersion = '5.4.11.Final' hibernateVersion = '5.4.12.Final'
hsqldbVersion = '2.5.0' hsqldbVersion = '2.5.0'
h2Version = '1.4.200' h2Version = '1.4.200'
jacksonVersion = '2.10.2' jacksonVersion = '2.10.3'
javaxActivationVersion = '1.2.0' javaxActivationVersion = '1.2.0'
javaxMailVersion = '1.6.2' javaxMailVersion = '1.6.2'
jmsApiVersion = '2.0.1' jmsApiVersion = '2.0.1'
jpa21ApiVersion = '1.0.2.Final' jpa21ApiVersion = '1.0.2.Final'
jpaApiVersion = '2.2.1' jpaApiVersion = '2.2.1'
jrubyVersion = '9.2.9.0' jrubyVersion = '9.2.11.0'
jschVersion = '0.1.55' jschVersion = '0.1.55'
jsonpathVersion = '2.4.0' jsonpathVersion = '2.4.0'
junit4Version = '4.13' junit4Version = '4.13'
@@ -78,24 +78,24 @@ ext {
jythonVersion = '2.7.0' jythonVersion = '2.7.0'
kryoShadedVersion = '4.0.2' kryoShadedVersion = '4.0.2'
lettuceVersion = '5.2.2.RELEASE' lettuceVersion = '5.2.2.RELEASE'
log4jVersion = '2.13.0' log4jVersion = '2.13.1'
micrometerVersion = '1.3.5' micrometerVersion = '1.3.5'
mockitoVersion = '3.2.4' mockitoVersion = '3.3.0'
mongoDriverVersion = '4.0.0-beta1' mongoDriverVersion = '4.0.0'
mysqlVersion = '8.0.19' mysqlVersion = '8.0.19'
pahoMqttClientVersion = '1.2.2' pahoMqttClientVersion = '1.2.2'
postgresVersion = '42.2.10' postgresVersion = '42.2.10'
reactorVersion = 'Dysprosium-SR4' reactorVersion = 'Dysprosium-SR5'
resilience4jVersion = '1.3.1' resilience4jVersion = '1.3.1'
romeToolsVersion = '1.12.2' romeToolsVersion = '1.12.2'
rsocketVersion = '1.0.0-RC6' rsocketVersion = '1.0.0-RC6'
servletApiVersion = '4.0.1' servletApiVersion = '4.0.1'
smackVersion = '4.3.4' smackVersion = '4.3.4'
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.4.RELEASE' springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.5.RELEASE'
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-M3' springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-M4'
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.3.0.RC1' springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.3.0.RELEASE'
springRetryVersion = '1.2.5.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' springWsVersion = '3.0.8.RELEASE'
tomcatVersion = "9.0.31" tomcatVersion = "9.0.31"
xstreamVersion = '1.4.11.1' xstreamVersion = '1.4.11.1'
@@ -319,7 +319,7 @@ configure(javaProjects) { subproject ->
checkstyle { checkstyle {
configFile = file("$rootDir/src/checkstyle/checkstyle.xml") configFile = file("$rootDir/src/checkstyle/checkstyle.xml")
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.29' toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.30'
} }
jar { jar {

View File

@@ -18,7 +18,6 @@ package org.springframework.integration.handler.advice;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.function.BiFunction; import java.util.function.BiFunction;
import java.util.function.Function;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation; 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. * 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. * calling provided {@code replyCustomizer} {@link BiFunction} with request message as a context.
* *
* A customization assumes to use supporting reactive operators like {@link Mono#timeout}, * A customization assumes to use supporting reactive operators like {@link Mono#timeout},
* {@link Mono#retry}, {@link Mono#tag} etc. * {@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 * @author Artem Bilan
* *

View File

@@ -23,8 +23,6 @@ import org.springframework.integration.rsocket.RSocketInteractionModel;
import org.springframework.integration.rsocket.inbound.RSocketInboundGateway; import org.springframework.integration.rsocket.inbound.RSocketInboundGateway;
import org.springframework.messaging.rsocket.RSocketStrategies; import org.springframework.messaging.rsocket.RSocketStrategies;
import reactor.core.publisher.Flux;
/** /**
* The {@link MessagingGatewaySpec} implementation for the {@link RSocketInboundGateway}. * The {@link MessagingGatewaySpec} implementation for the {@link RSocketInboundGateway}.
* *
@@ -85,8 +83,10 @@ public class RSocketInboundGatewaySpec extends MessagingGatewaySpec<RSocketInbou
} }
/** /**
* Configure an option to decode an incoming {@link Flux} as a single unit or each its event separately. * Configure an option to decode an incoming {@link reactor.core.publisher.Flux}
* @param decodeFluxAsUnit decode incoming {@link Flux} as a single unit or each event separately. * as a single unit or each its event separately.
* @param decodeFluxAsUnit decode incoming {@link reactor.core.publisher.Flux}
* as a single unit or each event separately.
* @return the spec * @return the spec
* @since 5.3 * @since 5.3
* @see RSocketInboundGateway#setDecodeFluxAsUnit(boolean) * @see RSocketInboundGateway#setDecodeFluxAsUnit(boolean)

View File

@@ -17,7 +17,6 @@
package org.springframework.integration.sftp.session; package org.springframework.integration.sftp.session;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
import java.util.Properties; import java.util.Properties;
@@ -204,7 +203,7 @@ public class DefaultSftpSessionFactory implements SessionFactory<LsEntry>, Share
* Specifies the filename that will be used for a host key repository. * Specifies the filename that will be used for a host key repository.
* The file has the same format as OpenSSH's known_hosts file. * The file has the same format as OpenSSH's known_hosts file.
* @param knownHosts the resource for known hosts. * @param knownHosts the resource for known hosts.
* @see JSch#setKnownHosts(InputStream) * @see JSch#setKnownHosts(java.io.InputStream)
* @since 5.2.5 * @since 5.2.5
*/ */
public void setKnownHostsResource(Resource knownHosts) { public void setKnownHostsResource(Resource knownHosts) {
@@ -439,8 +438,8 @@ public class DefaultSftpSessionFactory implements SessionFactory<LsEntry>, Share
} }
com.jcraft.jsch.Session jschSession = this.jsch.getSession(this.user, this.host, this.port); com.jcraft.jsch.Session jschSession = this.jsch.getSession(this.user, this.host, this.port);
JavaUtils.INSTANCE JavaUtils.INSTANCE
.acceptIfNotNull(this.sessionConfig, jschSession::setConfig) .acceptIfNotNull(this.sessionConfig, jschSession::setConfig)
.acceptIfHasText(this.userInfoWrapper.getPassword(), jschSession::setPassword); .acceptIfHasText(this.userInfoWrapper.getPassword(), jschSession::setPassword);
jschSession.setUserInfo(this.userInfoWrapper); jschSession.setUserInfo(this.userInfoWrapper);
try { try {
@@ -451,12 +450,12 @@ public class DefaultSftpSessionFactory implements SessionFactory<LsEntry>, Share
jschSession.setServerAliveInterval(this.serverAliveInterval); jschSession.setServerAliveInterval(this.serverAliveInterval);
} }
JavaUtils.INSTANCE JavaUtils.INSTANCE
.acceptIfNotNull(this.proxy, jschSession::setProxy) .acceptIfNotNull(this.proxy, jschSession::setProxy)
.acceptIfNotNull(this.socketFactory, jschSession::setSocketFactory) .acceptIfNotNull(this.socketFactory, jschSession::setSocketFactory)
.acceptIfHasText(this.clientVersion, jschSession::setClientVersion) .acceptIfHasText(this.clientVersion, jschSession::setClientVersion)
.acceptIfHasText(this.hostKeyAlias, jschSession::setHostKeyAlias) .acceptIfHasText(this.hostKeyAlias, jschSession::setHostKeyAlias)
.acceptIfNotNull(this.serverAliveCountMax, jschSession::setServerAliveCountMax) .acceptIfNotNull(this.serverAliveCountMax, jschSession::setServerAliveCountMax)
.acceptIfNotNull(this.enableDaemonThread, jschSession::setDaemonThread); .acceptIfNotNull(this.enableDaemonThread, jschSession::setDaemonThread);
} }
catch (Exception e) { catch (Exception e) {
throw new BeanCreationException("Attempt to set additional properties of " + throw new BeanCreationException("Attempt to set additional properties of " +

View File

@@ -14,9 +14,7 @@
<property name="fileExtensions" value="java"/> <property name="fileExtensions" value="java"/>
</module> </module>
<module name="NewlineAtEndOfFile"> <module name="NewlineAtEndOfFile"/>
<property name="lineSeparator" value="lf"/>
</module>
<!-- TreeWalker Checks --> <!-- TreeWalker Checks -->
<module name="TreeWalker"> <module name="TreeWalker">