|
32 | 32 | import java.lang.reflect.Type;
|
33 | 33 | import java.util.ArrayList;
|
34 | 34 | import java.util.Collection;
|
| 35 | +import java.util.List; |
35 | 36 |
|
36 | 37 | import static com.arangodb.internal.serde.SerdeUtils.constructParametricType;
|
37 | 38 |
|
@@ -109,9 +110,9 @@ private InternalRequest createInsertDocumentRequest(final DocumentCreateOptions
|
109 | 110 | protected <T> ResponseDeserializer<MultiDocumentEntity<DocumentCreateEntity<T>>> insertDocumentsResponseDeserializer(Class<T> userDataClass) {
|
110 | 111 | return response -> {
|
111 | 112 | final MultiDocumentEntity<DocumentCreateEntity<T>> multiDocument = new MultiDocumentEntity<>();
|
112 |
| - final Collection<DocumentCreateEntity<T>> docs = new ArrayList<>(); |
113 |
| - final Collection<ErrorEntity> errors = new ArrayList<>(); |
114 |
| - final Collection<Object> documentsAndErrors = new ArrayList<>(); |
| 113 | + final List<DocumentCreateEntity<T>> docs = new ArrayList<>(); |
| 114 | + final List<ErrorEntity> errors = new ArrayList<>(); |
| 115 | + final List<Object> documentsAndErrors = new ArrayList<>(); |
115 | 116 | final JsonNode body = getSerde().parse(response.getBody());
|
116 | 117 | for (final JsonNode next : body) {
|
117 | 118 | JsonNode isError = next.get(ArangoResponseField.ERROR_FIELD_NAME);
|
@@ -187,9 +188,9 @@ protected <T> ResponseDeserializer<MultiDocumentEntity<T>> getDocumentsResponseD
|
187 | 188 | final MultiDocumentEntity<T> multiDocument = new MultiDocumentEntity<>();
|
188 | 189 | boolean potentialDirtyRead = Boolean.parseBoolean(response.getMeta("X-Arango-Potential-Dirty-Read"));
|
189 | 190 | multiDocument.setPotentialDirtyRead(potentialDirtyRead);
|
190 |
| - final Collection<T> docs = new ArrayList<>(); |
191 |
| - final Collection<ErrorEntity> errors = new ArrayList<>(); |
192 |
| - final Collection<Object> documentsAndErrors = new ArrayList<>(); |
| 191 | + final List<T> docs = new ArrayList<>(); |
| 192 | + final List<ErrorEntity> errors = new ArrayList<>(); |
| 193 | + final List<Object> documentsAndErrors = new ArrayList<>(); |
193 | 194 | final JsonNode body = getSerde().parse(response.getBody());
|
194 | 195 | for (final JsonNode next : body) {
|
195 | 196 | JsonNode isError = next.get(ArangoResponseField.ERROR_FIELD_NAME);
|
@@ -247,9 +248,9 @@ protected <T> ResponseDeserializer<MultiDocumentEntity<DocumentUpdateEntity<T>>>
|
247 | 248 | final Class<T> returnType) {
|
248 | 249 | return response -> {
|
249 | 250 | final MultiDocumentEntity<DocumentUpdateEntity<T>> multiDocument = new MultiDocumentEntity<>();
|
250 |
| - final Collection<DocumentUpdateEntity<T>> docs = new ArrayList<>(); |
251 |
| - final Collection<ErrorEntity> errors = new ArrayList<>(); |
252 |
| - final Collection<Object> documentsAndErrors = new ArrayList<>(); |
| 251 | + final List<DocumentUpdateEntity<T>> docs = new ArrayList<>(); |
| 252 | + final List<ErrorEntity> errors = new ArrayList<>(); |
| 253 | + final List<Object> documentsAndErrors = new ArrayList<>(); |
253 | 254 | final JsonNode body = getSerde().parse(response.getBody());
|
254 | 255 | for (final JsonNode next : body) {
|
255 | 256 | JsonNode isError = next.get(ArangoResponseField.ERROR_FIELD_NAME);
|
@@ -309,9 +310,9 @@ protected <T> ResponseDeserializer<MultiDocumentEntity<DocumentUpdateEntity<T>>>
|
309 | 310 | final Class<T> returnType) {
|
310 | 311 | return response -> {
|
311 | 312 | final MultiDocumentEntity<DocumentUpdateEntity<T>> multiDocument = new MultiDocumentEntity<>();
|
312 |
| - final Collection<DocumentUpdateEntity<T>> docs = new ArrayList<>(); |
313 |
| - final Collection<ErrorEntity> errors = new ArrayList<>(); |
314 |
| - final Collection<Object> documentsAndErrors = new ArrayList<>(); |
| 313 | + final List<DocumentUpdateEntity<T>> docs = new ArrayList<>(); |
| 314 | + final List<ErrorEntity> errors = new ArrayList<>(); |
| 315 | + final List<Object> documentsAndErrors = new ArrayList<>(); |
315 | 316 | final JsonNode body = getSerde().parse(response.getBody());
|
316 | 317 | for (final JsonNode next : body) {
|
317 | 318 | JsonNode isError = next.get(ArangoResponseField.ERROR_FIELD_NAME);
|
@@ -365,9 +366,9 @@ protected <T> ResponseDeserializer<MultiDocumentEntity<DocumentDeleteEntity<T>>>
|
365 | 366 | final Class<T> userDataClass) {
|
366 | 367 | return response -> {
|
367 | 368 | final MultiDocumentEntity<DocumentDeleteEntity<T>> multiDocument = new MultiDocumentEntity<>();
|
368 |
| - final Collection<DocumentDeleteEntity<T>> docs = new ArrayList<>(); |
369 |
| - final Collection<ErrorEntity> errors = new ArrayList<>(); |
370 |
| - final Collection<Object> documentsAndErrors = new ArrayList<>(); |
| 369 | + final List<DocumentDeleteEntity<T>> docs = new ArrayList<>(); |
| 370 | + final List<ErrorEntity> errors = new ArrayList<>(); |
| 371 | + final List<Object> documentsAndErrors = new ArrayList<>(); |
371 | 372 | final JsonNode body = getSerde().parse(response.getBody());
|
372 | 373 | for (final JsonNode next : body) {
|
373 | 374 | JsonNode isError = next.get(ArangoResponseField.ERROR_FIELD_NAME);
|
|
0 commit comments