Skip to content

Commit

Permalink
fix: ClassCastException when handling "textDocument/inlineValue" event
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom authored and pisv committed Jan 27, 2025
1 parent 651eb49 commit db85990
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@

import java.util.ArrayList;

import org.eclipse.lsp4j.InlineValue;
import org.eclipse.lsp4j.InlineValueEvaluatableExpression;
import org.eclipse.lsp4j.InlineValueText;
import org.eclipse.lsp4j.InlineValueVariableLookup;
import org.eclipse.lsp4j.jsonrpc.json.adapters.CollectionTypeAdapter;
import org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter;
import org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter.PropertyChecker;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
import org.eclipse.lsp4j.jsonrpc.messages.Either3;

import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
Expand All @@ -29,8 +28,7 @@

public class InlineValueResponseAdapter implements TypeAdapterFactory {

private static final TypeToken<Either3<InlineValueText, InlineValueVariableLookup, InlineValueEvaluatableExpression>> ELEMENT_TYPE
= new TypeToken<>() {};
private static final TypeToken<InlineValue> ELEMENT_TYPE = new TypeToken<>() {};

private static final TypeToken<Either<InlineValueVariableLookup, InlineValueEvaluatableExpression>> R_ELEMENT_TYPE
= new TypeToken<>() {};
Expand Down

0 comments on commit db85990

Please sign in to comment.