mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-27 14:13:05 +02:00
Cleanup: Use String#join instead of Stream#collect
This commit is contained in:
parent
199573df59
commit
93f14a330d
@ -36,7 +36,7 @@ public class EntityParser {
|
|||||||
fields.add(convertToSQL(field));
|
fields.add(convertToSQL(field));
|
||||||
}
|
}
|
||||||
|
|
||||||
return fields.stream().collect(Collectors.joining(","));
|
return String.join(",", fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,7 +132,7 @@ public class Table {
|
|||||||
String statement;
|
String statement;
|
||||||
|
|
||||||
if (condition == null || condition.isEmpty()) {
|
if (condition == null || condition.isEmpty()) {
|
||||||
String format = '\'' + row.getValues().stream().collect(Collectors.joining("', ")) + '\'';
|
String format = '\'' + String.join("', ", row.getValues()) + '\'';
|
||||||
statement = String.format(INSERT_VALUES, format);
|
statement = String.format(INSERT_VALUES, format);
|
||||||
} else {
|
} else {
|
||||||
String format = row.getKeysAndValues().entrySet().stream()
|
String format = row.getKeysAndValues().entrySet().stream()
|
||||||
|
Loading…
Reference in New Issue
Block a user