Skip to content

Commit df1f5df

Browse files
committed
Add check to handle edge cases
1 parent 516ec4a commit df1f5df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/utils/StringUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public static String reduceWhitespace(String s) {
5454
}
5555

5656
public static String join(Collection<String> strings, CharSequence delimiter) {
57+
if (strings == null)
58+
return null;
5759
StringJoiner sj = new StringJoiner(delimiter);
5860
for (String s: strings) {
5961
sj.add(s);

0 commit comments

Comments
 (0)