From bfde59675441e340d7580aa9c883e0aa9585f1ab Mon Sep 17 00:00:00 2001 From: TyrantLucifer Date: Thu, 13 Oct 2022 21:46:37 +0800 Subject: [PATCH] [hotfix][connector][file] Solved the bug of can not parse '\t' as delimiter from config file (#3083) --- .../connectors/seatunnel/file/config/BaseTextFileConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseTextFileConfig.java b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseTextFileConfig.java index 4659d191325..dcbe0b948ec 100644 --- a/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseTextFileConfig.java +++ b/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseTextFileConfig.java @@ -50,11 +50,11 @@ public BaseTextFileConfig(@NonNull Config config) { throw new RuntimeException("compress not support now"); } - if (config.hasPath(Constant.FIELD_DELIMITER) && !StringUtils.isBlank(config.getString(Constant.FIELD_DELIMITER))) { + if (config.hasPath(Constant.FIELD_DELIMITER) && StringUtils.isNotEmpty(config.getString(Constant.FIELD_DELIMITER))) { this.fieldDelimiter = config.getString(Constant.FIELD_DELIMITER); } - if (config.hasPath(Constant.ROW_DELIMITER) && !StringUtils.isBlank(config.getString(Constant.ROW_DELIMITER))) { + if (config.hasPath(Constant.ROW_DELIMITER) && StringUtils.isNotEmpty(config.getString(Constant.ROW_DELIMITER))) { this.rowDelimiter = config.getString(Constant.ROW_DELIMITER); }