Skip to content

Commit aa89307

Browse files
committed
Use rabbit_data_coercion:to_map
1 parent a8dcca0 commit aa89307

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

deps/rabbit/src/rabbit_definitions.erl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,18 +1084,16 @@ runtime_parameter_definition(Param) ->
10841084
<<"value">> => maybe_map(pget(value, Param))
10851085
}.
10861086

1087-
maybe_map(Value) when is_list(Value) ->
1087+
maybe_map(Value) ->
10881088
%% Not all definitions are maps. `federation-upstream-set` is
10891089
%% a list of maps, and it should be exported as it has been
10901090
%% imported
10911091
try
1092-
maps:from_list(Value)
1092+
rabbit_data_coercion:to_map(Value)
10931093
catch
1094-
_:_ ->
1094+
error:badarg ->
10951095
Value
1096-
end;
1097-
maybe_map(Value) ->
1098-
Value.
1096+
end.
10991097

11001098
list_global_runtime_parameters() ->
11011099
[global_runtime_parameter_definition(P) || P <- rabbit_runtime_parameters:list_global(), not is_internal_parameter(P)].

0 commit comments

Comments
 (0)