Details
-
Improvement
-
Resolution: Fixed
-
Minor - P4
-
3.9.1
-
None
Description
The @throws in the javadoc snippets below look to be incorrect. So far as I can tell these methods only ever returns a MongoBulkWriteException or a MongoException (similar to the other insertMany methods).
|
MongoCollection lines 855-865 |
/** |
* Inserts one or more documents. A call to this method is equivalent to a call to the {@code bulkWrite} method
|
*
|
* <p>Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.</p>
|
* @param documents the documents to insert
|
* @param options the options to apply to the operation
|
* @throws com.mongodb.DuplicateKeyException if the write failed to a duplicate unique key
|
* @throws com.mongodb.WriteConcernException if the write failed due being unable to fulfil the write concern
|
* @throws com.mongodb.MongoException if the write failed due some other failure
|
*/
|
void insertMany(List<? extends TDocument> documents, InsertManyOptions options); |
and
|
MongoCollection lines 881-894 |
/** |
* Inserts one or more documents. A call to this method is equivalent to a call to the {@code bulkWrite} method
|
*
|
* <p>Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.</p>
|
* @param clientSession the client session with which to associate this operation
|
* @param documents the documents to insert
|
* @param options the options to apply to the operation
|
* @throws com.mongodb.DuplicateKeyException if the write failed to a duplicate unique key
|
* @throws com.mongodb.WriteConcernException if the write failed due being unable to fulfil the write concern
|
* @throws com.mongodb.MongoException if the write failed due some other failure
|
* @since 3.6
|
* @mongodb.server.release 3.6
|
*/
|
void insertMany(ClientSession clientSession, List<? extends TDocument> documents, InsertManyOptions options); |