Skip to content

Commit feea1ad

Browse files
Support nModified being optional in bulk write response (#1823)
JAVA-5986
1 parent 1b44a5d commit feea1ad

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
@@ -789,7 +789,7 @@ ClientBulkWriteResult build(@Nullable final MongoException topLevelError, final
789789
writeModelIndex,
790790
new ConcreteClientUpdateResult(
791791
individualOperationResponse.getInt32("n").getValue(),
792-
individualOperationResponse.getInt32("nModified").getValue(),
792+
individualOperationResponse.getInt32("nModified", new BsonInt32(0)).getValue(),
793793
upsertedIdDocument == null ? null : upsertedIdDocument.get("_id")));
794794
} else if (writeModel instanceof ConcreteClientNamespacedDeleteOneModel
795795
|| writeModel instanceof ConcreteClientNamespacedDeleteManyModel) {

0 commit comments

Comments
 (0)