Fix polymorphic bug
This commit is contained in:
parent
424c3f1c45
commit
379326fd63
@ -44,7 +44,7 @@ public abstract class MoshiPolymorphic<OBJ> {
|
||||
private synchronized void initialize() {
|
||||
if (!this.initialized) {
|
||||
this.initialized = true;
|
||||
var abstractMoshiBuilder = new Moshi.Builder().add(new RecordsJsonAdapterFactory());
|
||||
var abstractMoshiBuilder = new Moshi.Builder();
|
||||
var abstractClasses = getAbstractClasses();
|
||||
var concreteClasses = getConcreteClasses();
|
||||
var extraAdapters = getExtraAdapters();
|
||||
@ -67,6 +67,8 @@ public abstract class MoshiPolymorphic<OBJ> {
|
||||
|
||||
extraAdapters.forEach(abstractMoshiBuilder::add);
|
||||
|
||||
abstractMoshiBuilder.add(new RecordsJsonAdapterFactory());
|
||||
|
||||
abstractMoshi = abstractMoshiBuilder.build();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user