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

Use binary_to_atom/2 instead of binary_to_existing_atom/2. #933

Merged
merged 1 commit into from
May 9, 2014

Conversation

seancribbs
Copy link
Contributor

There's a possibility that the riak_dt code that contains the set operation
atoms hasn't been loaded when riak_kv_crdt_json:set_op_from_json/1 is invoked,
meaning binary_to_existing_atom/2 will raise a badarg. We are already checking
the incoming operation as a binary via a guard on the relevant function
clause, so it is safe to use binary_to_atom/2 instead.

There's a possibility that the riak_dt code that contains the set
operation atoms hasn't been loaded when
riak_kv_crdt_json:set_op_from_json/1 is invoked, meaning
binary_to_existing_atom/2 will raise a badarg. We are already checking
the incoming operation as a binary via a guard on the relevant
function clause, so it is safe to use binary_to_atom/2 instead.
@seancribbs seancribbs added this to the 2.0-RC milestone May 9, 2014
@Vagabond
Copy link
Contributor

Vagabond commented May 9, 2014

+1 2bab35b Fixes the issue I found.

borshop added a commit that referenced this pull request May 9, 2014
Use binary_to_atom/2 instead of binary_to_existing_atom/2.

Reviewed-by: Vagabond
seancribbs added a commit that referenced this pull request May 9, 2014
Use binary_to_atom/2 instead of binary_to_existing_atom/2.
@seancribbs seancribbs merged commit 0ba6934 into develop May 9, 2014
@seancribbs seancribbs deleted the bugfix/sdc/http-crdt-badarg branch May 9, 2014 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants