Source:
<code>public org.springframework.data.redis.connection.RedisConnectionFactory getObject() throws Exception { final LettuceConnectionFactory lettuceConnectionFactory; <START> final String sentinelNodesProperty = readPropertyValue(propertyPrefix + "sentinel.nodes", String.class, ""); <END> if (StringUtils.isBlank(sentinelNodesProperty)) { RedisStandaloneConfiguration standaloneConfiguration = new RedisStandaloneConfiguration(); standaloneConfiguration.setHostName(readPropertyValue(propertyPrefix + "host", String.class, "localhost")); standaloneConfiguration.setPort(readPropertyValue(propertyPrefix + "port", int.class, 6379)); standaloneConfiguration.setPassword(readPropertyValue(propertyPrefix + "password", String.class, null)); lettuceConnectionFactory = new LettuceConnectionFactory(standaloneConfiguration, buildLettuceClientConfiguration()); } else { List<String> sentinelNodes = Arrays.asList(sentinelNodesProperty.split(SENTINEL_HOST_SEPARATOR)); String redisMaster = readPropertyValue(propertyPrefix + "sentinel.master", String.class, "mymaster"); RedisSentinelConfiguration sentinelConfiguration = new RedisSentinelConfiguration(); sentinelConfiguration.master(redisMaster); sentinelNodes.stream() .map(HostAndPort::parse) .forEach(hostAndPort -> sentinelConfiguration.sentinel(hostAndPort.getHostText(), hostAndPort.getPort())); sentinelConfiguration.setSentinelPassword(readPropertyValue(propertyPrefix + "sentinel.password", String.class, null)); sentinelConfiguration.setPassword(readPropertyValue(propertyPrefix + "password", String.class, null)); lettuceConnectionFactory = new LettuceConnectionFactory(sentinelConfiguration, buildLettuceClientConfiguration()); } lettuceConnectionFactory.afterPropertiesSet(); return lettuceConnectionFactory; }</code><technical_language>wondering if more relevant avoid array in a single String, follow done for MongoDB repository. Please a <LINK_0> do think</technical_language>

Target:
public org.springframework.data.redis.connection.RedisConnectionFactory getObject() throws Exception { final LettuceConnectionFactory lettuceConnectionFactory; if (isSentinelEnabled()) { logger.debug("Redis repository configured to use Sentinel connection"); List<HostAndPort> sentinelNodes = getSentinelNodes(); String redisMaster = readPropertyValue(propertyPrefix + SENTINEL_PARAMETER_PREFIX + "master", String.class); if (StringUtils.isBlank(redisMaster)) { throw new IllegalStateException("Incorrect Sentinel configuration : parameter '" + SENTINEL_PARAMETER_PREFIX + "master' is mandatory !"); } RedisSentinelConfiguration sentinelConfiguration = new RedisSentinelConfiguration(); sentinelConfiguration.master(redisMaster); sentinelNodes.forEach(hostAndPort -> sentinelConfiguration.sentinel(hostAndPort.getHostText(), hostAndPort.getPort())); sentinelConfiguration.setSentinelPassword(readPropertyValue(propertyPrefix + SENTINEL_PARAMETER_PREFIX + "password", String.class)); sentinelConfiguration.setPassword(readPropertyValue(propertyPrefix + "password", String.class)); lettuceConnectionFactory = new LettuceConnectionFactory(sentinelConfiguration, buildLettuceClientConfiguration()); } else { logger.debug("Redis repository configured to use standalone connection"); RedisStandaloneConfiguration standaloneConfiguration = new RedisStandaloneConfiguration(); standaloneConfiguration.setHostName(readPropertyValue(propertyPrefix + "host", String.class, "localhost")); standaloneConfiguration.setPort(readPropertyValue(propertyPrefix + "port", int.class, 6379)); standaloneConfiguration.setPassword(readPropertyValue(propertyPrefix + "password", String.class)); lettuceConnectionFactory = new LettuceConnectionFactory(standaloneConfiguration, buildLettuceClientConfiguration()); } lettuceConnectionFactory.afterPropertiesSet(); return lettuceConnectionFactory; }