Update reactive streams MongoCollection docs by strogiyotec · Pull Request #1840 · mongodb/mongo-java-driver

Conversation

@strogiyotec

Copy link

Contributor

@strogiyotec strogiyotec commented

Nov 20, 2025

edited

Loading

JAVA-6000
Update the java doc for MongoCollection
Instead of returning null we return an empty Publisher The naming for returning empty publisher were borrowed from https://docs.oracle.com/en/java/javase/17/docs/api/java.net.http/java/net/http/HttpRequest.BodyPublishers.html

 If the sequence is empty an empty publisher is returned. Otherwise, if the sequence contains a single element, that publisher is returned. Otherwise a concatenation publisher is returned.

Here is an example from generated java docs with the change
image

Update the java doc for MongoCollection
Instead of returning null we return an empty Publisher
The naming for returning empty publisher were borrowed from
https://docs.oracle.com/en/java/javase/17/docs/api/java.net.http/java/net/http/HttpRequest.BodyPublishers.html
```
 If the sequence is empty an empty publisher is returned. Otherwise, if the sequence contains a single element, that publisher is returned. Otherwise a concatenation publisher is returned.
```

@strogiyotec strogiyotec requested a review from a team as a code owner

November 20, 2025 05:28

@strogiyotec strogiyotec requested review from vbabanin and removed request for a team

November 20, 2025 05:28
Copy link

Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rozza rozza removed the request for review from vbabanin

November 20, 2025 09:34

@strogiyotec strogiyotec merged commit b62ffaf into main

Nov 20, 2025

51 of 56 checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rozza rozza rozza approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@strogiyotec @rozza