diff --git a/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotRange.java b/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotRange.java index b7a0cae4d9..6531d7b512 100644 --- a/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotRange.java +++ b/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotRange.java @@ -96,8 +96,8 @@ private List toHostAndPorts(List nodes) { private RedisClusterNode toRedisClusterNode(HostAndPort hostAndPort, String slaveOf, Set flags) { RedisClusterNode redisClusterNode = new RedisClusterNode(); - redisClusterNode.setUri(RedisURI - .create(hostAndPort.getHostText(), hostAndPort.getPortOrDefault(RedisURI.DEFAULT_REDIS_PORT))); + redisClusterNode.setUri(new RedisURI + .Builder().redis(hostAndPort.getHostText(), hostAndPort.getPortOrDefault(RedisURI.DEFAULT_REDIS_PORT)).build()); redisClusterNode.setSlaveOf(slaveOf); redisClusterNode.setFlags(flags); return redisClusterNode; diff --git a/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotsParser.java b/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotsParser.java index 58bb147ce0..f78b1897a9 100644 --- a/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotsParser.java +++ b/src/main/java/com/lambdaworks/redis/cluster/models/slots/ClusterSlotsParser.java @@ -101,7 +101,7 @@ private static RedisClusterNode getRedisClusterNode(Iterator iterator) { String nodeId; RedisClusterNode redisClusterNode = new RedisClusterNode(); - redisClusterNode.setUri(RedisURI.create(host, port)); + redisClusterNode.setUri(new RedisURI.Builder().redis(host, port).build()); if (hostAndPortIterator.hasNext()) { nodeId = (String) hostAndPortIterator.next();