Skip to content

Commit

Permalink
Fix for java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
vaperion committed Jan 2, 2024
1 parent 61f6c7c commit a5a532f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public Map<Character, String> parseFlags(@NotNull Command command, @NotNull List
return map;
}

@SuppressWarnings("SizeReplaceableByIsEmpty") // Not available in Java 8
@NotNull
public static List<String> combineQuotedArguments(@NotNull List<String> args) {
String whole = String.join(" ", args);
Expand All @@ -145,7 +146,7 @@ public static List<String> combineQuotedArguments(@NotNull List<String> args) {
}

if (c == ' ' && boundary == '\0') {
if (!building.isEmpty()) {
if (building.length() > 0) {
arguments.add(building.toString());
building.setLength(0);
}
Expand All @@ -155,7 +156,7 @@ public static List<String> combineQuotedArguments(@NotNull List<String> args) {
building.append(c);
}

if (!building.isEmpty()) {
if (building.length() > 0) {
arguments.add(building.toString());
}

Expand Down

0 comments on commit a5a532f

Please sign in to comment.