DATAREDIS-976 - Polishing.
Add missing nullable annotations. Original pull request: #457
This commit is contained in:
2
Makefile
2
Makefile
@@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
REDIS_VERSION:=5.0.4
|
REDIS_VERSION:=5.0.5
|
||||||
SPRING_PROFILE?=ci
|
SPRING_PROFILE?=ci
|
||||||
SHELL=/bin/bash -euo pipefail
|
SHELL=/bin/bash -euo pipefail
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import org.springframework.beans.factory.DisposableBean;
|
import org.springframework.beans.factory.DisposableBean;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
@@ -380,10 +379,12 @@ public class LettuceConnectionFactory
|
|||||||
* @param timeout command timeout in {@link TimeUnit#MILLISECONDS}.
|
* @param timeout command timeout in {@link TimeUnit#MILLISECONDS}.
|
||||||
* @param database database index to operate on.
|
* @param database database index to operate on.
|
||||||
* @return the {@link LettuceConnection}.
|
* @return the {@link LettuceConnection}.
|
||||||
|
* @throws IllegalArgumentException if a required parameter is {@literal null}.
|
||||||
* @since 2.2
|
* @since 2.2
|
||||||
*/
|
*/
|
||||||
protected LettuceConnection doCreateLettuceConnection(StatefulRedisConnection<byte[], byte[]> sharedConnection,
|
protected LettuceConnection doCreateLettuceConnection(
|
||||||
LettuceConnectionProvider connectionProvider, long timeout, int database) {
|
@Nullable StatefulRedisConnection<byte[], byte[]> sharedConnection, LettuceConnectionProvider connectionProvider,
|
||||||
|
long timeout, int database) {
|
||||||
|
|
||||||
return new LettuceConnection(sharedConnection, connectionProvider, timeout, database);
|
return new LettuceConnection(sharedConnection, connectionProvider, timeout, database);
|
||||||
}
|
}
|
||||||
@@ -398,12 +399,13 @@ public class LettuceConnectionFactory
|
|||||||
* @param clusterCommandExecutor the {@link ClusterCommandExecutor} to release connections.
|
* @param clusterCommandExecutor the {@link ClusterCommandExecutor} to release connections.
|
||||||
* @param commandTimeout command timeout {@link Duration}.
|
* @param commandTimeout command timeout {@link Duration}.
|
||||||
* @return the {@link LettuceConnection}.
|
* @return the {@link LettuceConnection}.
|
||||||
|
* @throws IllegalArgumentException if a required parameter is {@literal null}.
|
||||||
* @since 2.2
|
* @since 2.2
|
||||||
*/
|
*/
|
||||||
protected LettuceClusterConnection doCreateLettuceClusterConnection(
|
protected LettuceClusterConnection doCreateLettuceClusterConnection(
|
||||||
StatefulRedisClusterConnection<byte[], byte[]> sharedConnection, LettuceConnectionProvider connectionProvider,
|
@Nullable StatefulRedisClusterConnection<byte[], byte[]> sharedConnection,
|
||||||
ClusterTopologyProvider topologyProvider, ClusterCommandExecutor clusterCommandExecutor,
|
LettuceConnectionProvider connectionProvider, ClusterTopologyProvider topologyProvider,
|
||||||
Duration commandTimeout) {
|
ClusterCommandExecutor clusterCommandExecutor, Duration commandTimeout) {
|
||||||
|
|
||||||
return new LettuceClusterConnection(sharedConnection, connectionProvider, topologyProvider, clusterCommandExecutor,
|
return new LettuceClusterConnection(sharedConnection, connectionProvider, topologyProvider, clusterCommandExecutor,
|
||||||
commandTimeout);
|
commandTimeout);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import org.junit.Assume;
|
|||||||
import org.junit.rules.ExternalResource;
|
import org.junit.rules.ExternalResource;
|
||||||
import org.junit.rules.TestRule;
|
import org.junit.rules.TestRule;
|
||||||
import org.springframework.data.redis.connection.RedisClusterConfiguration;
|
import org.springframework.data.redis.connection.RedisClusterConfiguration;
|
||||||
import org.springframework.data.redis.connection.RedisConfiguration;
|
|
||||||
import org.springframework.data.redis.connection.RedisNode;
|
import org.springframework.data.redis.connection.RedisNode;
|
||||||
import org.springframework.data.redis.connection.jedis.JedisConverters;
|
import org.springframework.data.redis.connection.jedis.JedisConverters;
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@ public class RedisClusterRule extends ExternalResource {
|
|||||||
Assume.assumeThat(mode, is("cluster"));
|
Assume.assumeThat(mode, is("cluster"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public RedisConfiguration getConfiguration() {
|
public RedisClusterConfiguration getConfiguration() {
|
||||||
return this.clusterConfig;
|
return this.clusterConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user