lsp4j
lsp4j copied to clipboard
TypeAdapter(Factories) dont check passed (token) type
our TypeAdapter(Factories) dont check if the (token) type passed into
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
matches the type the adapter is for.
when testing with
GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapterFactory(new RestartArgumentsTypeAdapterFactory());
Gson gson = builder.create();
XXXX object = gson.fromJson("{\"noDebug\":true}", ELEMENT_TYPE.getType());
this may lead to stackoverflows