188 lines
6.6 KiB
Java
188 lines
6.6 KiB
Java
package c.g.a.c;
|
|
|
|
import c.g.a.b.b;
|
|
import c.g.a.b.c;
|
|
import c.g.a.b.d;
|
|
import c.g.a.b.i;
|
|
import c.g.a.b.k;
|
|
import c.g.a.b.t.e;
|
|
import c.g.a.c.a0.d;
|
|
import c.g.a.c.c0.d0;
|
|
import c.g.a.c.c0.w;
|
|
import c.g.a.c.c0.x;
|
|
import c.g.a.c.g0.f;
|
|
import c.g.a.c.g0.j;
|
|
import c.g.a.c.g0.q;
|
|
import c.g.a.c.h0.n;
|
|
import c.g.a.c.i0.p;
|
|
import c.g.a.c.z.a;
|
|
import c.g.a.c.z.d;
|
|
import c.g.a.c.z.g;
|
|
import java.io.Closeable;
|
|
import java.io.IOException;
|
|
import java.io.Serializable;
|
|
import java.io.Writer;
|
|
import java.lang.annotation.Annotation;
|
|
import java.util.Locale;
|
|
import java.util.Objects;
|
|
import java.util.Set;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
/* compiled from: ObjectMapper */
|
|
public class r extends i implements Serializable {
|
|
public static final b i;
|
|
public static final a j;
|
|
private static final long serialVersionUID = 2;
|
|
public final d _coercionConfigs;
|
|
public final g _configOverrides;
|
|
public f _deserializationConfig;
|
|
public c.g.a.c.a0.d _deserializationContext;
|
|
public i _injectableValues;
|
|
public final c _jsonFactory;
|
|
public d0 _mixIns;
|
|
public Set<Object> _registeredModuleTypes;
|
|
public final ConcurrentHashMap<j, k<Object>> _rootDeserializers;
|
|
public v _serializationConfig;
|
|
public q _serializerFactory;
|
|
public j _serializerProvider;
|
|
public c.g.a.c.e0.d _subtypeResolver;
|
|
public n _typeFactory;
|
|
|
|
static {
|
|
x xVar = new x();
|
|
i = xVar;
|
|
j = new a(null, xVar, null, n.j, null, c.g.a.c.i0.r.o, Locale.getDefault(), null, b.b, c.g.a.c.e0.h.g.i, new w.b());
|
|
}
|
|
|
|
public r() {
|
|
this(null, null, null);
|
|
}
|
|
|
|
public r(c cVar, j jVar, c.g.a.c.a0.d dVar) {
|
|
this._rootDeserializers = new ConcurrentHashMap<>(64, 0.6f, 2);
|
|
if (cVar == null) {
|
|
this._jsonFactory = new q(this);
|
|
} else {
|
|
this._jsonFactory = cVar;
|
|
if (cVar.b() == null) {
|
|
cVar._objectCodec = this;
|
|
}
|
|
}
|
|
this._subtypeResolver = new c.g.a.c.e0.h.i();
|
|
p pVar = new p();
|
|
this._typeFactory = n.j;
|
|
d0 d0Var = new d0(null);
|
|
this._mixIns = d0Var;
|
|
a aVar = j;
|
|
c.g.a.c.c0.r rVar = new c.g.a.c.c0.r();
|
|
a aVar2 = aVar._classIntrospector == rVar ? aVar : new a(rVar, aVar._annotationIntrospector, aVar._propertyNamingStrategy, aVar._typeFactory, aVar._typeResolverBuilder, aVar._dateFormat, aVar._locale, aVar._timeZone, aVar._defaultBase64, aVar._typeValidator, aVar._accessorNaming);
|
|
g gVar = new g();
|
|
this._configOverrides = gVar;
|
|
d dVar2 = new d();
|
|
this._coercionConfigs = dVar2;
|
|
this._serializationConfig = new v(aVar2, this._subtypeResolver, d0Var, pVar, gVar);
|
|
this._deserializationConfig = new f(aVar2, this._subtypeResolver, d0Var, pVar, gVar, dVar2);
|
|
Objects.requireNonNull(this._jsonFactory);
|
|
v vVar = this._serializationConfig;
|
|
p pVar2 = p.SORT_PROPERTIES_ALPHABETICALLY;
|
|
if (vVar.q(pVar2)) {
|
|
this._serializationConfig = this._serializationConfig.t(pVar2);
|
|
this._deserializationConfig = this._deserializationConfig.t(pVar2);
|
|
}
|
|
this._serializerProvider = new j.a();
|
|
this._deserializationContext = new d.a(c.g.a.c.a0.b.i);
|
|
this._serializerFactory = f.k;
|
|
}
|
|
|
|
public final void a(String str, Object obj) {
|
|
if (obj == null) {
|
|
throw new IllegalArgumentException(String.format("argument \"%s\" is null", str));
|
|
}
|
|
}
|
|
|
|
public final void b(c.g.a.b.d dVar, Object obj) throws IOException {
|
|
Exception e;
|
|
v vVar = this._serializationConfig;
|
|
if (!vVar.v(w.CLOSE_CLOSEABLE) || !(obj instanceof Closeable)) {
|
|
try {
|
|
this._serializerProvider.K(vVar, this._serializerFactory).L(dVar, obj);
|
|
dVar.close();
|
|
} catch (Exception e2) {
|
|
Annotation[] annotationArr = c.g.a.c.i0.d.a;
|
|
dVar.b(d.a.AUTO_CLOSE_JSON_CONTENT);
|
|
try {
|
|
dVar.close();
|
|
} catch (Exception e3) {
|
|
e2.addSuppressed(e3);
|
|
}
|
|
if (!(e2 instanceof IOException)) {
|
|
c.g.a.c.i0.d.x(e2);
|
|
throw new RuntimeException(e2);
|
|
}
|
|
throw ((IOException) e2);
|
|
}
|
|
} else {
|
|
Closeable closeable = (Closeable) obj;
|
|
try {
|
|
this._serializerProvider.K(vVar, this._serializerFactory).L(dVar, obj);
|
|
try {
|
|
closeable.close();
|
|
dVar.close();
|
|
} catch (Exception e4) {
|
|
e = e4;
|
|
closeable = null;
|
|
c.g.a.c.i0.d.f(dVar, closeable, e);
|
|
throw null;
|
|
}
|
|
} catch (Exception e5) {
|
|
e = e5;
|
|
c.g.a.c.i0.d.f(dVar, closeable, e);
|
|
throw null;
|
|
}
|
|
}
|
|
}
|
|
|
|
public c.g.a.b.d c(Writer writer) throws IOException {
|
|
a("w", writer);
|
|
c cVar = this._jsonFactory;
|
|
c.g.a.b.p.c cVar2 = new c.g.a.b.p.c(cVar.a(), writer, false);
|
|
if (cVar._outputDecorator == null) {
|
|
c.g.a.b.q.d dVar = new c.g.a.b.q.d(cVar2, cVar._generatorFeatures, cVar._objectCodec, writer, cVar._quoteChar);
|
|
int i2 = cVar._maximumNonEscapedChar;
|
|
if (i2 > 0) {
|
|
dVar.y0(i2);
|
|
}
|
|
if (cVar._characterEscapes == null) {
|
|
k kVar = cVar._rootValueSeparator;
|
|
if (kVar != c.l) {
|
|
dVar.u = kVar;
|
|
}
|
|
v vVar = this._serializationConfig;
|
|
Objects.requireNonNull(vVar);
|
|
if (w.INDENT_OUTPUT.h(vVar._serFeatures) && dVar.k == null) {
|
|
c.g.a.b.j jVar = vVar._defaultPrettyPrinter;
|
|
if (jVar instanceof e) {
|
|
jVar = (c.g.a.b.j) ((e) jVar).e();
|
|
}
|
|
if (jVar != null) {
|
|
dVar.k = jVar;
|
|
}
|
|
}
|
|
boolean h = w.WRITE_BIGDECIMAL_AS_PLAIN.h(vVar._serFeatures);
|
|
int i3 = vVar._generatorFeaturesToChange;
|
|
if (i3 != 0 || h) {
|
|
int i4 = vVar._generatorFeatures;
|
|
if (h) {
|
|
int h2 = d.a.WRITE_BIGDECIMAL_AS_PLAIN.h();
|
|
i4 |= h2;
|
|
i3 |= h2;
|
|
}
|
|
dVar.w0(i4, i3);
|
|
}
|
|
return dVar;
|
|
}
|
|
throw null;
|
|
}
|
|
throw null;
|
|
}
|
|
}
|