Void return types need to always be null value#728
Conversation
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 eclipse-lsp4j#721
|
@mickaelistria @sebthom I would appreciate your input/review on this PR. |
|
I tried it with vscode-js-debug dapDebugAdapter and it now works (while previously I had to tweak the debug adapter). |
|
Thanks for the testing @mickaelistria - this will be included in the 0.21.0 release in a couple of weeks. I will wait to give @sebthom a chance to review before I merge though. |
|
@jonahgraham could you provide an update site to try like last time? https://download.eclipse.org/lsp4j/builds/jonah/dap_return_void/ |
|
@eclipse-lsp4j-bot run tests |
|
@jonahgraham as we dont build prs at |
|
We never published PRs to download.eclipse.org as PRs could come from untrusted people. Only branches on this repo get to download.eclipse.org with lsp4j-multi-build/ - I am closing this PR in preference to #729 which should get a download soon. Longer term we can add saving the artifacts to the github actions so it can be used in this way (PRs welcome on that!) |
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