Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Jun 18, 2024
1 parent 42e835a commit 546d745
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -758,12 +758,6 @@ public void write(JsonWriter out, T value) throws IOException {
}

public T read(JsonReader in) throws IOException {
if (rawType == MTMV.class && Env.getCurrentEnvJournalVersion() < FeMetaVersion.VERSION_135) {
JsonElement json = Streams.parse(in);
JsonObject jsonObject = json.getAsJsonObject();
jsonObject.addProperty("clazz", MTMV.class.getSimpleName());
return (T) GsonUtils.GSON.fromJson(jsonObject, MTMV.class);
}
return delegate.read(in);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public RuntimeTypeAdapterFactory<T> registerCompatibleSubtype(Class<? extends T>
}

public <R> TypeAdapter<R> create(Gson gson, TypeToken<R> type) {
if (type.getRawType() != baseType && !subtypeToLabel.containsKey(type.getRawType())) {
if (!baseType.isAssignableFrom(type.getRawType()) && !subtypeToLabel.containsKey(type.getRawType())) {
return null;
}

Expand Down

0 comments on commit 546d745

Please sign in to comment.