Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable args in documentation #190

Closed
neckbosov opened this issue Mar 21, 2020 · 1 comment
Closed

Nullable args in documentation #190

neckbosov opened this issue Mar 21, 2020 · 1 comment

Comments

@neckbosov
Copy link

Arguments of filter, sort, limit and other methods of CoroutineFindPublisher are transmitted through Kotlin non-null types (without ?), but method's documentation describes them as nullable, e.g.

   /**
     * Sets the limit to apply.
     *
     * @param limit the limit, which may be null
     * @return this
     * @mongodb.driver.manual reference/method/cursor.limit/#cursor.limit Limit
     */
    fun limit(limit: Int): CoroutineFindPublisher<T> = publisher.limit(limit).coroutine

What is expecting behavior of such methods? This ambiguity should be fixed.

@zigzago
Copy link
Member

zigzago commented Mar 28, 2020

Thank you for reporting. Your are right. The KMongo doc is copied from the mongo java driver doc - that has also the issue - see https://mongodb.github.io/mongo-java-driver-reactivestreams/1.13/javadoc/com/mongodb/reactivestreams/client/FindPublisher.html#limit-int-

I'm going to fix the doc for KMongo. I suggest you create a bug in the mongo java driver tracker too: https://jira.mongodb.org/projects/JAVA/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants