Skip to content

Commit 1ef94ed

Browse files
lukestephensonrozza
authored andcommitted
Support nModified being optional in bulk write response (mongodb#1823)
JAVA-5986
1 parent 672ef06 commit 1ef94ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ ClientBulkWriteResult build(@Nullable final MongoException topLevelError, final
775775
writeModelIndex,
776776
new ConcreteClientUpdateResult(
777777
individualOperationResponse.getInt32("n").getValue(),
778-
individualOperationResponse.getInt32("nModified").getValue(),
778+
individualOperationResponse.getInt32("nModified", new BsonInt32(0)).getValue(),
779779
upsertedIdDocument == null ? null : upsertedIdDocument.get("_id")));
780780
} else if (writeModel instanceof ConcreteClientNamespacedDeleteOneModel
781781
|| writeModel instanceof ConcreteClientNamespacedDeleteManyModel) {

0 commit comments

Comments
 (0)