Skip to content

Commit db85990

Browse files
sebthompisv
authored andcommitted
fix: ClassCastException when handling "textDocument/inlineValue" event
1 parent 651eb49 commit db85990

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/adapters/InlineValueResponseAdapter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313

1414
import java.util.ArrayList;
1515

16+
import org.eclipse.lsp4j.InlineValue;
1617
import org.eclipse.lsp4j.InlineValueEvaluatableExpression;
17-
import org.eclipse.lsp4j.InlineValueText;
1818
import org.eclipse.lsp4j.InlineValueVariableLookup;
1919
import org.eclipse.lsp4j.jsonrpc.json.adapters.CollectionTypeAdapter;
2020
import org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter;
2121
import org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter.PropertyChecker;
2222
import org.eclipse.lsp4j.jsonrpc.messages.Either;
23-
import org.eclipse.lsp4j.jsonrpc.messages.Either3;
2423

2524
import com.google.gson.Gson;
2625
import com.google.gson.TypeAdapter;
@@ -29,8 +28,7 @@
2928

3029
public class InlineValueResponseAdapter implements TypeAdapterFactory {
3130

32-
private static final TypeToken<Either3<InlineValueText, InlineValueVariableLookup, InlineValueEvaluatableExpression>> ELEMENT_TYPE
33-
= new TypeToken<>() {};
31+
private static final TypeToken<InlineValue> ELEMENT_TYPE = new TypeToken<>() {};
3432

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

0 commit comments

Comments
 (0)