3838 * }
3939 *
4040 * @Override
41- * public Object decode(String methodKey, Reader reader, Type type) {
41+ * public Object decode(Reader reader, Type type) {
4242 * return gson.fromJson(reader, type);
4343 * }
4444 * }
@@ -61,20 +61,19 @@ public abstract class Decoder {
6161 * opposed to just the {@link feign.Response.Body} when decoding into a new
6262 * instance of {@code type}.
6363 *
64- * @param methodKey {@link feign.Feign#configKey} of the java method that invoked the request. ex. {@code IAM#getUser()}
6564 * @param response HTTP response.
6665 * @param type Target object type.
6766 * @return instance of {@code type}
6867 * @throws IOException if there was a network error reading the response.
6968 * @throws Exception if the decoder threw a checked exception.
7069 */
71- public Object decode (String methodKey , Response response , Type type ) throws Exception {
70+ public Object decode (Response response , Type type ) throws Exception {
7271 Response .Body body = response .body ();
7372 if (body == null )
7473 return null ;
7574 Reader reader = body .asReader ();
7675 try {
77- return decode (methodKey , reader , type );
76+ return decode (reader , type );
7877 } finally {
7978 ensureClosed (body );
8079 }
@@ -84,14 +83,12 @@ public Object decode(String methodKey, Response response, Type type) throws Exce
8483 * Implement this to decode a {@code Reader} to an object of the specified
8584 * type.
8685 *
87- * @param methodKey {@link feign.Feign#configKey} of the java method that invoked the request.
88- * ex. {@code IAM#getUser()}
89- * @param reader no need to close this, as {@link #decode(String, Response, Type)}
86+ * @param reader no need to close this, as {@link #decode(Response, Type)}
9087 * manages resources.
9188 * @param type Target object type.
9289 * @return instance of {@code type}
9390 * @throws IOException will be propagated safely to the caller.
9491 * @throws Exception if the decoder threw a checked exception.
9592 */
96- public abstract Object decode (String methodKey , Reader reader , Type type ) throws Exception ;
93+ public abstract Object decode (Reader reader , Type type ) throws Exception ;
9794}
0 commit comments