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

Change BundleService#update() to only return boolean for success #2141

Merged
merged 1 commit into from Apr 26, 2016

Conversation

Projects
None yet
2 participants
@joschi
Contributor

joschi commented Apr 26, 2016

The WriteResult returned by JacksonDBCollection#updateById() doesn't contain the updated object and thus WriteResult#getSavedObject() failed with "No objects to return".
The returned WriteResult does contain the number of changed documents, though, so simply comparing that number with the expected number of updated documents suffices as return value of
BundleService#update().

Fixes #2138

Change BundleService#update() to only return boolean for success
The WriteResult returned by JacksonDBCollection doesn't contain the updated object
and thus WriteResult#getSavedObject() failed with "No objects to return". The returned
WriteResult does contain the number of changed documents, though, so simply comparing
that number with the expected number of updated documents suffices as return value of
BundleService#update().

Fixes #2138

@joschi joschi added this to the 2.0.0 milestone Apr 26, 2016

@bernd bernd self-assigned this Apr 26, 2016

@bernd

This comment has been minimized.

Member

bernd commented Apr 26, 2016

LGTM 👍

@bernd bernd merged commit 1e7388f into 2.0 Apr 26, 2016

4 checks passed

ci-server-integration Jenkins build graylog2-server-integration-pr 864 has succeeded
Details
ci-web-linter Jenkins build graylog-pr-linter-check 352 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@bernd bernd deleted the issue-2138 branch Apr 26, 2016

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