Sonar Fixes
Critical smells for `o.s.i.jdbc`. Fix new smell in TCP.
This commit is contained in:
committed by
Artem Bilan
parent
579a72265c
commit
ca2e70f236
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -26,6 +26,7 @@ import org.springframework.core.serializer.Serializer;
|
||||
import org.springframework.integration.ip.IpHeaders;
|
||||
import org.springframework.integration.support.AbstractIntegrationMessageBuilder;
|
||||
import org.springframework.integration.util.SimplePool;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
@@ -392,7 +393,7 @@ public class CachingClientConnectionFactory extends AbstractClientConnectionFact
|
||||
|
||||
private final AtomicBoolean released = new AtomicBoolean();
|
||||
|
||||
private CachedConnection(TcpConnectionSupport connection, TcpListener tcpListener) {
|
||||
private CachedConnection(TcpConnectionSupport connection, @Nullable TcpListener tcpListener) {
|
||||
super.setTheConnection(connection);
|
||||
registerListener(tcpListener);
|
||||
}
|
||||
|
||||
@@ -204,7 +204,9 @@ public class TcpNetServerConnectionFactory extends AbstractServerConnectionFacto
|
||||
* @return The Server Socket.
|
||||
* @throws IOException Any IOException.
|
||||
*/
|
||||
protected ServerSocket createServerSocket(int port, int backlog, InetAddress whichNic) throws IOException {
|
||||
protected ServerSocket createServerSocket(int port, int backlog, @Nullable InetAddress whichNic)
|
||||
throws IOException {
|
||||
|
||||
ServerSocketFactory serverSocketFactory = this.tcpSocketFactorySupport.getServerSocketFactory();
|
||||
if (whichNic == null) {
|
||||
return serverSocketFactory.createServerSocket(port, Math.abs(backlog));
|
||||
|
||||
Reference in New Issue
Block a user