Skip to content

Commit 2b12bbe

Browse files
committed
JAVA-2641: Add missing @nullable annotation to UpdateResult#getUpsertedId
1 parent 259a41e commit 2b12bbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

driver-core/src/main/com/mongodb/client/result/UpdateResult.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public abstract class UpdateResult {
6363
*
6464
* @return if the replace resulted in an inserted document, the _id of the inserted document, otherwise null
6565
*/
66+
@Nullable
6667
public abstract BsonValue getUpsertedId();
6768

6869
/**
@@ -192,6 +193,7 @@ public long getModifiedCount() {
192193
}
193194

194195
@Override
196+
@Nullable
195197
public BsonValue getUpsertedId() {
196198
throw getUnacknowledgedWriteException();
197199
}

0 commit comments

Comments
 (0)