eclipse-lsp4j / lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.
https://eclipse.org/lsp4j
Other
599 stars 143 forks source link

Void return types need to always be null value #729

Closed jonahgraham closed 1 year ago

jonahgraham commented 1 year ago

Void type in Java cannot be instantiated, therefore if a type is declared as Void the fromJson should always set that value to null.

If you want to have a generic return type that allows non-null and null results, use a type other than Void as the return type.

Fixes #721

jonahgraham commented 1 year ago

This has recreated #728 but in the eclipse/lsp4j repo so that we can get a p2 site out of it easily.

jonahgraham commented 1 year ago

@sebthom - here you go https://download.eclipse.org/lsp4j/builds/jonah/fixes_721/

sebthom commented 1 year ago

I tested it with the Haxe and Dart Debug Adapters and it works fine.