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

Error logs when find and delete doesn't find a matching result #1051

Closed
aritrachatterjee15 opened this issue Oct 22, 2016 · 0 comments · Fixed by #1065
Closed

Error logs when find and delete doesn't find a matching result #1051

aritrachatterjee15 opened this issue Oct 22, 2016 · 0 comments · Fixed by #1065
Milestone

Comments

@aritrachatterjee15
Copy link

Morphia: 1.3.0-SNAPSHOT
Mongo driver: 3.4.0-rc1
JDK: 8

22-Oct-2016 12:43:30.053 SEVERE [Thread-10] org.mongodb.morphia.mapping.Mapper.fromDBObject Somebody passed in a null dbObject; bad client! java.lang.Throwable at org.mongodb.morphia.mapping.Mapper.fromDBObject(Mapper.java:186) at org.mongodb.morphia.DatastoreImpl.findAndDelete(DatastoreImpl.java:330) at org.mongodb.morphia.DatastoreImpl.findAndDelete(DatastoreImpl.java:307)

DatastoreImpl line 330: Should this be:
return result == null ? null : mapper.fromDBObject(...)

@evanchooly evanchooly modified the milestone: 1.3.0 Oct 26, 2016
evanchooly pushed a commit that referenced this issue Nov 2, 2016
evanchooly added a commit that referenced this issue Nov 7, 2016
* check for null before trying to convert the result
update the error message

fixes #1051

* add some tests for enforcing write concern values
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

Successfully merging a pull request may close this issue.

2 participants