MCPcopy Index your code
hub / github.com/OpenFeign/feign / decode

Method decode

core/src/main/java/feign/codec/DefaultDecoder.java:25–33  ·  view source on GitHub ↗
(Response response, Type type)

Source from the content-addressed store, hash-verified

23public class DefaultDecoder extends StringDecoder {
24
25 @Override
26 public Object decode(Response response, Type type) throws IOException {
27 if (response.status() == 404 || response.status() == 204) return Util.emptyValueOf(type);
28 if (response.body() == null) return null;
29 if (byte[].class.equals(type)) {
30 return Util.toByteArray(response.body().asInputStream());
31 }
32 return super.decode(response, type);
33 }
34}

Callers

nothing calls this directly

Calls 7

emptyValueOfMethod · 0.95
toByteArrayMethod · 0.95
bodyMethod · 0.65
asInputStreamMethod · 0.65
decodeMethod · 0.65
statusMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected