Skip to content

Commit 9522c60

Browse files
committed
covariant params in replaceDocuments and insertDocuments
1 parent 27745fb commit 9522c60

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

core/src/main/java/com/arangodb/ArangoCollection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
149149
* Documentation</a>
150150
*/
151151
<T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
152-
Collection<T> values, DocumentCreateOptions options, Class<T> type);
152+
Collection<? extends T> values, DocumentCreateOptions options, Class<T> type);
153153

154154
/**
155155
* Bulk imports the given values into the collection.
@@ -334,7 +334,7 @@ <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(
334334
* Documentation</a>
335335
*/
336336
<T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(
337-
Collection<T> values, DocumentReplaceOptions options, Class<T> type);
337+
Collection<? extends T> values, DocumentReplaceOptions options, Class<T> type);
338338

339339
/**
340340
* Partially updates the document identified by document-key. The value must contain a document with the attributes

core/src/main/java/com/arangodb/ArangoDB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public interface ArangoDB extends ArangoSerdeAccessor {
276276
* @param type Deserialization target type for the response body (POJO or {@link com.arangodb.util.RawData})
277277
* @return response
278278
*/
279-
<T, U> Response<U> execute(Request<T> request, Class<U> type);
279+
<T> Response<T> execute(Request<?> request, Class<T> type);
280280

281281
/**
282282
* Returns the server logs

core/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
9696
}
9797

9898
@Override
99-
public <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(Collection<T> values,
99+
public <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(Collection<? extends T> values,
100100
DocumentCreateOptions options,
101101
Class<T> type) {
102102
return executor
@@ -210,7 +210,7 @@ public <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(
210210
}
211211

212212
@Override
213-
public <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(Collection<T> values,
213+
public <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(Collection<? extends T> values,
214214
DocumentReplaceOptions options,
215215
Class<T> type) {
216216
return executor.execute(replaceDocumentsRequest(values, options), replaceDocumentsResponseDeserializer(type));

core/src/main/java/com/arangodb/internal/ArangoDBImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void grantDefaultCollectionAccess(final String user, final Permissions pe
179179
}
180180

181181
@Override
182-
public <T, U> Response<U> execute(Request<T> request, Class<U> type) {
182+
public <T> Response<T> execute(Request<?> request, Class<T> type) {
183183
return executor.execute(executeRequest(request), responseDeserializer(type));
184184
}
185185

0 commit comments

Comments
 (0)