Hisoka-X commented on code in PR #8841: URL: https://github.com/apache/seatunnel/pull/8841#discussion_r1971290332
########## 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: The behavior before is same as this patch. Because when host or port not configured, `config.get(RedisBaseOptions.HOST)` will return null. -- 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: commits-unsubscr...@seatunnel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org