Skip to content

Commit 6c86dec

Browse files
committed
fix: trim strings for null-safety
1 parent c43e378 commit 6c86dec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public MySqlSourceConfigFactory hostname(String hostname) {
9494
*/
9595
public MySqlSourceConfigFactory snapshotHostname(String snapshotHostname) {
9696
this.snapshotHostname =
97-
(snapshotHostname != null && snapshotHostname.isEmpty()) ? null : snapshotHostname;
97+
(snapshotHostname != null && snapshotHostname.trim().isEmpty()) ? null : snapshotHostname;
9898
return this;
9999
}
100100

0 commit comments

Comments
 (0)