@@ -266,18 +266,16 @@ protected Pool<Jedis> createRedisSentinelPool(RedisSentinelConfiguration config)
266266 */
267267protected Pool <Jedis > createRedisPool () {
268268
269- return useSsl
270- ? new JedisPool (getPoolConfig (), getShardInfo ().getHost (), getShardInfo ().getPort (),
271- getTimeoutFrom (getShardInfo ()), getShardInfo ().getPassword (), true )
272- : new JedisPool (getPoolConfig (), getShardInfo ().getHost (), getShardInfo ().getPort (),
273- getTimeoutFrom (getShardInfo ()), getShardInfo ().getPassword ());
269+ return new JedisPool (getPoolConfig (), getShardInfo ().getHost (), getShardInfo ().getPort (),
270+ getTimeoutFrom (getShardInfo ()), getShardInfo ().getPassword (), useSsl );
274271}
275272
276273private JedisCluster createCluster () {
277274
278275JedisCluster cluster = createCluster (this .clusterConfig , this .poolConfig );
279- this .clusterCommandExecutor = new ClusterCommandExecutor (new JedisClusterConnection .JedisClusterTopologyProvider (
280- cluster ), new JedisClusterConnection .JedisClusterNodeResourceProvider (cluster ), EXCEPTION_TRANSLATION );
276+ this .clusterCommandExecutor = new ClusterCommandExecutor (
277+ new JedisClusterConnection .JedisClusterTopologyProvider (cluster ),
278+ new JedisClusterConnection .JedisClusterNodeResourceProvider (cluster ), EXCEPTION_TRANSLATION );
281279return cluster ;
282280}
283281
@@ -300,14 +298,8 @@ protected JedisCluster createCluster(RedisClusterConfiguration clusterConfig, Ge
300298
301299int redirects = clusterConfig .getMaxRedirects () != null ? clusterConfig .getMaxRedirects ().intValue () : 5 ;
302300
303- if (poolConfig != null ) {
304- return StringUtils .hasText (getPassword ())
305- ? new JedisCluster (hostAndPort , timeout , timeout , redirects , getPassword (), poolConfig )
306- : new JedisCluster (hostAndPort , timeout , redirects , poolConfig );
307- }
308-
309301return StringUtils .hasText (getPassword ())
310- ? new JedisCluster (hostAndPort , timeout , timeout , redirects , getPassword () , poolConfig )
302+ ? new JedisCluster (hostAndPort , timeout , timeout , redirects , password , poolConfig )
311303: new JedisCluster (hostAndPort , timeout , redirects , poolConfig );
312304}
313305
@@ -349,8 +341,8 @@ public RedisConnection getConnection() {
349341}
350342
351343Jedis jedis = fetchJedisConnector ();
352- JedisConnection connection = (usePool ? new JedisConnection (jedis , pool , dbIndex ) : new JedisConnection ( jedis ,
353- null , dbIndex ));
344+ JedisConnection connection = (usePool ? new JedisConnection (jedis , pool , dbIndex )
345+ : new JedisConnection ( jedis , null , dbIndex ));
354346connection .setConvertPipelineAndTxResults (convertPipelineAndTxResults );
355347return postProcessConnection (connection );
356348}
0 commit comments