fcb-xiaobo commented on code in PR #8841:
URL: https://github.com/apache/seatunnel/pull/8841#discussion_r1972695134


##########
seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisParameters.java:
##########
@@ -65,10 +65,14 @@ public class RedisParameters implements Serializable {
     private int redisVersion;
 
     public void buildWithConfig(ReadonlyConfig config) {
-        // set host
-        this.host = config.get(RedisBaseOptions.HOST);
-        // set port
-        this.port = config.get(RedisBaseOptions.PORT);
+        if (config.getOptional(RedisBaseOptions.HOST).isPresent()) {
+            // set host
+            this.host = config.get(RedisBaseOptions.HOST);
+        }
+        if (config.getOptional(RedisBaseOptions.PORT).isPresent()) {
+            // set port
+            this.port = config.get(RedisBaseOptions.PORT);
+        }

Review Comment:
   Okay, I understand what you mean. Thank you for your suggestion



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to