Don't append seperators if null
This commit is contained in:
parent
a45b7dfa3e
commit
2be3825438
1 changed files with 2 additions and 2 deletions
|
|
@ -54,9 +54,9 @@ public class ListBuilder<T> {
|
|||
int i = 1;
|
||||
for (T t : list) {
|
||||
sb.append(formatter.format(t));
|
||||
if (i == list.size() - 1) {
|
||||
if (i == list.size() - 1 && lastSeperator != null) {
|
||||
sb.append(lastSeperator);
|
||||
} else if (i != list.size()) {
|
||||
} else if (i != list.size() && seperator != null) {
|
||||
sb.append(seperator);
|
||||
}
|
||||
i++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue