Skip to content

Commit c95ea47

Browse files
authored
Fix warnings (#1633)
1 parent 36448cd commit c95ea47

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

Diff for: driver-scala/src/main/scala/org/mongodb/scala/MongoCluster.scala

+14-16
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import com.mongodb.reactivestreams.client.{ MongoCluster => JMongoCluster }
2222
import org.bson.codecs.configuration.CodecRegistry
2323
import org.mongodb.scala.bson.DefaultHelper.DefaultsTo
2424
import org.mongodb.scala.bson.conversions.Bson
25-
import org.mongodb.scala.model.bulk.ClientNamespacedUpdateManyModel
26-
import org.mongodb.scala.model.bulk.ClientNamespacedDeleteManyModel
2725
import org.mongodb.scala.model.bulk.{ ClientBulkWriteOptions, ClientBulkWriteResult, ClientNamespacedWriteModel }
2826

2927
import scala.collection.JavaConverters._
@@ -296,19 +294,19 @@ class MongoCluster(private val wrapped: JMongoCluster) {
296294
/**
297295
* Executes a client-level bulk write operation.
298296
* This method is functionally equivalent to `bulkWrite(List, ClientBulkWriteOptions)`
299-
* with the [[ClientBulkWriteOptions.clientBulkWriteOptions default options]].
297+
* with the [[org.mongodb.scala.model.bulk.ClientBulkWriteOptions.clientBulkWriteOptions default options]].
300298
*
301299
* This operation supports retryable writes.
302300
* Depending on the number of `models`, encoded size of `models`, and the size limits in effect,
303301
* executing this operation may require multiple `bulkWrite` commands.
304302
* The eligibility for retries is determined per each `bulkWrite` command:
305-
* [[ClientNamespacedUpdateManyModel]], [[ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
303+
* [[org.mongodb.scala.model.bulk.ClientNamespacedUpdateManyModel]], [[org.mongodb.scala.model.bulk.ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
306304
*
307305
* This operation is not supported by MongoDB Atlas Serverless instances.
308306
*
309307
* [[https://www.mongodb.com/docs/manual/reference/command/bulkWrite/ bulkWrite]]
310-
* @param models The [[ClientNamespacedWriteModel]] individual write operations.
311-
* @return The [[SingleObservable]] signalling at most one element [[ClientBulkWriteResult]] if the operation is successful,
308+
* @param models The [[org.mongodb.scala.model.bulk.ClientNamespacedWriteModel]] individual write operations.
309+
* @return The [[SingleObservable]] signalling at most one element [[org.mongodb.scala.model.bulk.ClientBulkWriteResult]] if the operation is successful,
312310
* or the following errors:
313311
* - [[ClientBulkWriteException]]: If and only if the operation is unsuccessful or partially unsuccessful,
314312
* and there is at least one of the following pieces of information to report:
@@ -329,14 +327,14 @@ class MongoCluster(private val wrapped: JMongoCluster) {
329327
* Depending on the number of `models`, encoded size of `models`, and the size limits in effect,
330328
* executing this operation may require multiple `bulkWrite` commands.
331329
* The eligibility for retries is determined per each `bulkWrite` command:
332-
* [[ClientNamespacedUpdateManyModel]], [[ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
330+
* [[org.mongodb.scala.model.bulk.ClientNamespacedUpdateManyModel]], [[org.mongodb.scala.model.bulk.ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
333331
*
334332
* This operation is not supported by MongoDB Atlas Serverless instances.
335333
*
336334
* [[https://www.mongodb.com/docs/manual/reference/command/bulkWrite/ bulkWrite]]
337-
* @param models The [[ClientNamespacedWriteModel]] individual write operations.
335+
* @param models The [[org.mongodb.scala.model.bulk.ClientNamespacedWriteModel]] individual write operations.
338336
* @param options The options.
339-
* @return The [[SingleObservable]] signalling at most one element [[ClientBulkWriteResult]] if the operation is successful,
337+
* @return The [[SingleObservable]] signalling at most one element [[org.mongodb.scala.model.bulk.ClientBulkWriteResult]] if the operation is successful,
340338
* or the following errors:
341339
* - [[ClientBulkWriteException]]: If and only if the operation is unsuccessful or partially unsuccessful,
342340
* and there is at least one of the following pieces of information to report:
@@ -355,20 +353,20 @@ class MongoCluster(private val wrapped: JMongoCluster) {
355353
/**
356354
* Executes a client-level bulk write operation.
357355
* This method is functionally equivalent to `bulkWrite(ClientSession, List, ClientBulkWriteOptions)`
358-
* with the [[ClientBulkWriteOptions.clientBulkWriteOptions default options]].
356+
* with the [[org.mongodb.scala.model.bulk.ClientBulkWriteOptions.clientBulkWriteOptions default options]].
359357
*
360358
* This operation supports retryable writes.
361359
* Depending on the number of `models`, encoded size of `models`, and the size limits in effect,
362360
* executing this operation may require multiple `bulkWrite` commands.
363361
* The eligibility for retries is determined per each `bulkWrite` command:
364-
* [[ClientNamespacedUpdateManyModel]], [[ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
362+
* [[org.mongodb.scala.model.bulk.ClientNamespacedUpdateManyModel]], [[org.mongodb.scala.model.bulk.ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
365363
*
366364
* This operation is not supported by MongoDB Atlas Serverless instances.
367365
*
368366
* [[https://www.mongodb.com/docs/manual/reference/command/bulkWrite/ bulkWrite]]
369367
* @param clientSession [[ClientSession client session]] with which to associate this operation.
370-
* @param models The [[ClientNamespacedWriteModel]] individual write operations.
371-
* @return The [[SingleObservable]] signalling at most one element [[ClientBulkWriteResult]] if the operation is successful,
368+
* @param models The [[org.mongodb.scala.model.bulk.ClientNamespacedWriteModel]] individual write operations.
369+
* @return The [[SingleObservable]] signalling at most one element [[org.mongodb.scala.model.bulk.ClientBulkWriteResult]] if the operation is successful,
372370
* or the following errors:
373371
* - [[ClientBulkWriteException]]: If and only if the operation is unsuccessful or partially unsuccessful,
374372
* and there is at least one of the following pieces of information to report:
@@ -391,13 +389,13 @@ class MongoCluster(private val wrapped: JMongoCluster) {
391389
* Depending on the number of `models`, encoded size of `models`, and the size limits in effect,
392390
* executing this operation may require multiple `bulkWrite` commands.
393391
* The eligibility for retries is determined per each `bulkWrite` command:
394-
* [[ClientNamespacedUpdateManyModel]], [[ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
392+
* [[org.mongodb.scala.model.bulk.ClientNamespacedUpdateManyModel]], [[org.mongodb.scala.model.bulk.ClientNamespacedDeleteManyModel]] in a command render it non-retryable.
395393
*
396394
* [[https://www.mongodb.com/docs/manual/reference/command/bulkWrite/ bulkWrite]]
397395
* @param clientSession The [[ClientSession client session]] with which to associate this operation.
398-
* @param models The [[ClientNamespacedWriteModel]] individual write operations.
396+
* @param models The [[org.mongodb.scala.model.bulk.ClientNamespacedWriteModel]] individual write operations.
399397
* @param options The options.
400-
* @return The [[SingleObservable]] signalling at most one element [[ClientBulkWriteResult]] if the operation is successful,
398+
* @return The [[SingleObservable]] signalling at most one element [[org.mongodb.scala.model.bulk.ClientBulkWriteResult]] if the operation is successful,
401399
* or the following errors:
402400
* - [[ClientBulkWriteException]]: If and only if the operation is unsuccessful or partially unsuccessful,
403401
* and there is at least one of the following pieces of information to report:

Diff for: driver-scala/src/test/scala/org/mongodb/scala/MongoClientSpec.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class MongoClientSpec extends BaseSpec with MockitoSugar {
103103

104104
it should "call the underlying bulkWrite with models only" in {
105105
val models = List(ClientNamespacedWriteModel.insertOne(namespace, Document("key" -> "value")))
106-
mongoClient.bulkWrite(models) shouldBe a[SingleObservable[ClientBulkWriteResult]]
106+
mongoClient.bulkWrite(models) shouldBe a[SingleObservable[_]]
107107
verify(wrapped).bulkWrite(models.asJava)
108108
}
109109

0 commit comments

Comments
 (0)