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

Documentation contradicts return type #34

Closed
StefanLiebig opened this issue Aug 28, 2017 · 5 comments
Closed

Documentation contradicts return type #34

StefanLiebig opened this issue Aug 28, 2017 · 5 comments

Comments

@StefanLiebig
Copy link

E.g. the extension function
public fun <T> MongoCollection<T>.findOneAndReplace(filter: String, replacement: T, options: FindOneAndReplaceOptions): T
defined in org.litote.kmongo in file ExtensionsKt.class says about the return value

If no documents matched the query filter, then null will bereturned

If this is true then the return type should be T?

using KMongo 3.4.1

@zigzago
Copy link
Member

zigzago commented Aug 28, 2017

Thanks for reporting. You are right and I'm going to change the signature.

@StefanLiebig
Copy link
Author

From your last 764b597 it seems that you did not catch this
fun <T> MongoCollection<T>.findOneAndDelete(filter: String, options: FindOneAndDeleteOptions = FindOneAndDeleteOptions()): T

@zigzago
Copy link
Member

zigzago commented Aug 29, 2017

True. Thanks!

@StefanLiebig
Copy link
Author

unfortunately didn't find its way into 3.4.2

@zigzago
Copy link
Member

zigzago commented Sep 14, 2017

will be in 3.5.0 in two weeks ;)

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