basho/riak_core — pull request #266 by janpieper (2013-01-06 02:01:23+00:00)
Title: Use riak_core_capabilites:get_supported/2 to avoid crash

I'm quite new to erlang and riak_core but i think i just found a bug which can cause a crash. Two weeks ago i already created an issue for Sean Cribbs' riak_id (see seancribbs/riak_id#3 for further details) because i thought the bug is located within riak_id. Since i got no response for about two weeks i tried to debug the error and found `orddict:fetch(node(), State#state.supported)` which will raise an error if `node()` cannot be found in `State#state.supported`. It seems like `get_supported/2` is already handling that case so i changed `orddict:fetch(...)` to `get_supported(...)`.