Skip to content

Commit 1bdf875

Browse files
DATAREDIS-976 - Polishing.
Add missing nullable annotations. Original pull request: #457
1 parent 05798fb commit 1bdf875

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
REDIS_VERSION:=5.0.4
15+
REDIS_VERSION:=5.0.5
1616
SPRING_PROFILE?=ci
1717
SHELL=/bin/bash -euo pipefail
1818

src/main/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactory.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
import org.apache.commons.logging.Log;
4444
import org.apache.commons.logging.LogFactory;
45-
4645
import org.springframework.beans.factory.DisposableBean;
4746
import org.springframework.beans.factory.InitializingBean;
4847
import org.springframework.dao.DataAccessException;
@@ -380,10 +379,12 @@ public RedisClusterConnection getClusterConnection() {
380379
* @param timeout command timeout in {@link TimeUnit#MILLISECONDS}.
381380
* @param database database index to operate on.
382381
* @return the {@link LettuceConnection}.
382+
* @throws IllegalArgumentException if a required parameter is {@literal null}.
383383
* @since 2.2
384384
*/
385-
protected LettuceConnection doCreateLettuceConnection(StatefulRedisConnection<byte[], byte[]> sharedConnection,
386-
LettuceConnectionProvider connectionProvider, long timeout, int database) {
385+
protected LettuceConnection doCreateLettuceConnection(
386+
@Nullable StatefulRedisConnection<byte[], byte[]> sharedConnection, LettuceConnectionProvider connectionProvider,
387+
long timeout, int database) {
387388

388389
return new LettuceConnection(sharedConnection, connectionProvider, timeout, database);
389390
}
@@ -398,12 +399,13 @@ protected LettuceConnection doCreateLettuceConnection(StatefulRedisConnection<by
398399
* @param clusterCommandExecutor the {@link ClusterCommandExecutor} to release connections.
399400
* @param commandTimeout command timeout {@link Duration}.
400401
* @return the {@link LettuceConnection}.
402+
* @throws IllegalArgumentException if a required parameter is {@literal null}.
401403
* @since 2.2
402404
*/
403405
protected LettuceClusterConnection doCreateLettuceClusterConnection(
404-
StatefulRedisClusterConnection<byte[], byte[]> sharedConnection, LettuceConnectionProvider connectionProvider,
405-
ClusterTopologyProvider topologyProvider, ClusterCommandExecutor clusterCommandExecutor,
406-
Duration commandTimeout) {
406+
@Nullable StatefulRedisClusterConnection<byte[], byte[]> sharedConnection,
407+
LettuceConnectionProvider connectionProvider, ClusterTopologyProvider topologyProvider,
408+
ClusterCommandExecutor clusterCommandExecutor, Duration commandTimeout) {
407409

408410
return new LettuceClusterConnection(sharedConnection, connectionProvider, topologyProvider, clusterCommandExecutor,
409411
commandTimeout);

src/test/java/org/springframework/data/redis/test/util/RedisClusterRule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.junit.rules.ExternalResource;
2424
import org.junit.rules.TestRule;
2525
import org.springframework.data.redis.connection.RedisClusterConfiguration;
26-
import org.springframework.data.redis.connection.RedisConfiguration;
2726
import org.springframework.data.redis.connection.RedisNode;
2827
import org.springframework.data.redis.connection.jedis.JedisConverters;
2928

@@ -64,7 +63,7 @@ public void before() {
6463
Assume.assumeThat(mode, is("cluster"));
6564
}
6665

67-
public RedisConfiguration getConfiguration() {
66+
public RedisClusterConfiguration getConfiguration() {
6867
return this.clusterConfig;
6968
}
7069

0 commit comments

Comments
 (0)