Skip to content

Commit

Permalink
[Improve] Use isEmpty() instead of length() == 0 or size() == 0 for c…
Browse files Browse the repository at this point in the history
…ollections (#3350)
  • Loading branch information
caicancai authored Nov 26, 2023
1 parent 03f42ca commit 7b8c21c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit 7b8c21c

Please sign in to comment.