You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/15 15:25:13 UTC

[GitHub] kimmking commented on a change in pull request #2018: [Dubbo-2017]Fix redis auth problem for RedisProtocol

kimmking commented on a change in pull request #2018: [Dubbo-2017]Fix redis auth problem for RedisProtocol
URL: https://github.com/apache/incubator-dubbo/pull/2018#discussion_r202546026
 
 

 ##########
 File path: dubbo-rpc/dubbo-rpc-redis/src/main/java/org/apache/dubbo/rpc/protocol/redis/RedisProtocol.java
 ##########
 @@ -89,8 +91,15 @@ private Serialization getSerialization(URL url) {
                 config.setTimeBetweenEvictionRunsMillis(url.getParameter("time.between.eviction.runs.millis", 0));
             if (url.getParameter("min.evictable.idle.time.millis", 0) > 0)
                 config.setMinEvictableIdleTimeMillis(url.getParameter("min.evictable.idle.time.millis", 0));
-            final JedisPool jedisPool = new JedisPool(config, url.getHost(), url.getPort(DEFAULT_PORT),
-                    url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
+            if (StringUtils.isBlank(url.getPassword())) {
+                jedisPool = new JedisPool(config, url.getHost(), url.getPort(DEFAULT_PORT),
 
 Review comment:
   You can use StringUtils.isBlank(url.getPassword())?:  style to replace if style, reduce reduplicated codes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org