36 lines
975 B
Java
36 lines
975 B
Java
|
package o;
|
||
|
|
||
|
import com.google.gson.TypeAdapter;
|
||
|
import com.google.gson.stream.JsonReader;
|
||
|
import com.google.gson.stream.JsonToken;
|
||
|
import com.google.gson.stream.JsonWriter;
|
||
|
import java.io.IOException;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class fRA<T> extends TypeAdapter<T> {
|
||
|
private final TypeAdapter<T> b;
|
||
|
|
||
|
public fRA(TypeAdapter<T> typeAdapter) {
|
||
|
this.b = typeAdapter;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.gson.TypeAdapter
|
||
|
public final void write(JsonWriter jsonWriter, T t) throws IOException {
|
||
|
if (t == null) {
|
||
|
jsonWriter.nullValue();
|
||
|
} else {
|
||
|
this.b.write(jsonWriter, t);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.gson.TypeAdapter
|
||
|
/* renamed from: read */
|
||
|
public final T read2(JsonReader jsonReader) throws IOException {
|
||
|
if (jsonReader.peek() == JsonToken.NULL) {
|
||
|
jsonReader.nextNull();
|
||
|
return null;
|
||
|
}
|
||
|
return this.b.read2(jsonReader);
|
||
|
}
|
||
|
}
|