Skip to content

Commit 8737e8d

Browse files
algolia-botshortcutsmillotp
committed
chore: generated code for commit a2d3b70. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent a2d3b70 commit 8737e8d

File tree

139 files changed

+37577
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+37577
-11
lines changed

clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiClient.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,9 @@ public String parameterToString(Object param) {
178178
String jsonStr = JSON.serialize(param);
179179
return jsonStr.substring(1, jsonStr.length() - 1);
180180
} else if (param instanceof Collection) {
181-
StringBuilder b = new StringBuilder();
181+
StringJoiner b = new StringJoiner(",");
182182
for (Object o : (Collection) param) {
183-
if (b.length() > 0) {
184-
b.append(",");
185-
}
186-
b.append(String.valueOf(o));
183+
b.add(String.valueOf(o));
187184
}
188185
return b.toString();
189186
} else {
@@ -204,12 +201,7 @@ public List<Pair> parameterToPair(String name, Object value) {
204201
List<Pair> params = new ArrayList<Pair>();
205202

206203
// preconditions
207-
if (
208-
name == null ||
209-
name.isEmpty() ||
210-
value == null ||
211-
value instanceof Collection
212-
) {
204+
if (name == null || name.isEmpty() || value == null) {
213205
return params;
214206
}
215207

0 commit comments

Comments
 (0)