This is an automated email from the ASF dual-hosted git repository.
panyuepeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 7b8c21c02 [Improve] Use isEmpty() instead of length() == 0 or size()
== 0 for collections (#3350)
7b8c21c02 is described below
commit 7b8c21c02aa213248899dcd1312a5a1a053dd0eb
Author: caicancai <[email protected]>
AuthorDate: Mon Nov 27 00:13:46 2023 +0800
[Improve] Use isEmpty() instead of length() == 0 or size() == 0 for
collections (#3350)
---
.../streampark/flink/connector/doris/util/DorisDelimiterParser.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/streampark-flink/streampark-flink-connector/streampark-flink-connector-doris/src/main/java/org/apache/streampark/flink/connector/doris/util/DorisDelimiterParser.java
b/streampark-flink/streampark-flink-connector/streampark-flink-connector-doris/src/main/java/org/apache/streampark/flink/connector/doris/util/DorisDelimiterParser.java
index 1c804b7ae..886c85246 100644
---
a/streampark-flink/streampark-flink-connector/streampark-flink-connector-doris/src/main/java/org/apache/streampark/flink/connector/doris/util/DorisDelimiterParser.java
+++
b/streampark-flink/streampark-flink-connector/streampark-flink-connector-doris/src/main/java/org/apache/streampark/flink/connector/doris/util/DorisDelimiterParser.java
@@ -24,7 +24,7 @@ public class DorisDelimiterParser {
private static final String HEX_STRING = "0123456789ABCDEF";
public static String parse(String sp) throws RuntimeException {
- if (sp == null || sp.length() == 0) {
+ if (sp == null || sp.isBlank()) {
throw new RuntimeException("Delimiter can't be empty");
}
if (!sp.toUpperCase().startsWith("\\X")) {