Skip to content

Commit

Permalink
Remove repeated conditional test (#8732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliverwqcwrw authored Jul 14, 2022
1 parent 704210e commit 667a34d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ public static String join(Collection collection, String separator) {
if (objects[i] != null) {
stringBuilder.append(objects[i]);
if (i != collection.size() - 1 && separator != null) {
if (separator != null) {
stringBuilder.append(separator);
}
stringBuilder.append(separator);
}
}
}
Expand Down

0 comments on commit 667a34d

Please sign in to comment.