Skip to content

Commit

Permalink
Deprecate methods in JSON RPC support
Browse files Browse the repository at this point in the history
References #378, #391

(cherry picked from commit 3f079cf)
  • Loading branch information
acogoluegnes committed Aug 17, 2018
1 parent 5239b2c commit 56bd21b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main/java/com/rabbitmq/tools/jsonrpc/JsonRpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
* a {@link JsonRpcMapper}.
*
* @see #call(String, Object[])
* @see #call(String[])
* @see JsonRpcMapper
* @see JacksonJsonRpcMapper
*/
Expand Down Expand Up @@ -102,7 +101,15 @@ public JsonRpcClient(Channel channel, String exchange, String routingKey)
/**
* Private API - used by {@link #call(String[])} to ad-hoc convert
* strings into the required data types for a call.
*
* This method is deprecated because it uses homegrown JSON utilities
* that don't deal correctly with complex types. The {@link JacksonJsonRpcMapper}
* has been introduced to handle primitive and complex types, as well
* as primitive wrappers correctly.
*
* @deprecated This method will be removed in the next major version
*/
@Deprecated
public static Object coerce(String val, String type)
throws NumberFormatException {
if ("bit".equals(type)) {
Expand Down Expand Up @@ -204,12 +211,19 @@ public <T> T createProxy(Class<T> klass)
* passed through coerce() to attempt to make them the types the
* server is expecting.
*
* This method is deprecated because it uses homegrown JSON utilities
* that don't deal correctly with complex types. The {@link JacksonJsonRpcMapper}
* has been introduced to handle primitive and complex types, as well
* as primitive wrappers correctly.
*
* @return the result contained within the reply, if no exception is found
* @throws JsonRpcException if the reply object contained an exception
* @throws NumberFormatException if a coercion failed
* @throws TimeoutException if a response is not received within the timeout specified, if any
* @see #coerce
* @deprecated This method will be removed in the next major version
*/
@Deprecated
public Object call(String[] args)
throws NumberFormatException, IOException, JsonRpcException, TimeoutException {
if (args.length == 0) {
Expand Down

0 comments on commit 56bd21b

Please sign in to comment.