Reduce visual complexity of branching.

This commit is contained in:
Jake Wharton
2018-02-13 15:04:34 -05:00
parent b131d3bba0
commit bc7d849362

View File

@@ -146,15 +146,12 @@ final class ClassJsonAdapter<T> extends JsonAdapter<T> {
reader.beginObject(); reader.beginObject();
while (reader.hasNext()) { while (reader.hasNext()) {
int index = reader.selectName(options); int index = reader.selectName(options);
FieldBinding<?> fieldBinding; if (index == -1) {
if (index != -1) {
fieldBinding = fieldsArray[index];
} else {
reader.nextName(); reader.nextName();
reader.skipValue(); reader.skipValue();
continue; continue;
} }
fieldBinding.read(reader, result); fieldsArray[index].read(reader, result);
} }
reader.endObject(); reader.endObject();
return result; return result;