Skip to content

Commit f571e53

Browse files
committed
More idiomatic change of empty mono type
1 parent 38109c9 commit f571e53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/gridfs/GridFSUploadPublisherImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.mongodb.reactivestreams.client.ClientSession;
2828
import com.mongodb.reactivestreams.client.MongoCollection;
2929
import com.mongodb.reactivestreams.client.gridfs.GridFSUploadPublisher;
30+
import org.bson.BsonDocument;
3031
import org.bson.BsonValue;
3132
import org.bson.Document;
3233
import org.bson.types.Binary;
@@ -155,7 +156,7 @@ private Mono<Void> createCheckAndCreateIndexesMono(@Nullable final Timeout timeo
155156
.switchIfEmpty(Mono.defer(() ->
156157
checkAndCreateIndex(filesCollection.withReadPreference(primary()), FILES_INDEX, timeout)
157158
.then(checkAndCreateIndex(chunksCollection.withReadPreference(primary()), CHUNKS_INDEX, timeout))
158-
.then(Mono.fromCallable(Document::new))
159+
.then(Mono.empty())
159160
))
160161
.then();
161162
}

0 commit comments

Comments
 (0)