Skip to content

Commit

Permalink
Use isEmpty instead of length > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignas committed Dec 17, 2023
1 parent 4e659c0 commit 8cfc8cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/lt/pow/nukagit/dfs/GitDfsPackCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static String[] extractQuotedStrings(String input) {
insideQuotes = true;
} else if (!Character.isWhitespace(c)) {
currentString.append(c);
} else if (currentString.length() > 0) {
} else if (!currentString.isEmpty()) {
splitStrings.add(currentString.toString());
currentString.setLength(0);
}
Expand All @@ -118,7 +118,7 @@ public static String[] extractQuotedStrings(String input) {
}
}

if (currentString.length() > 0) {
if (!currentString.isEmpty()) {
splitStrings.add(currentString.toString());
}

Expand Down

0 comments on commit 8cfc8cc

Please sign in to comment.