Skip to content

Void return types need to always be null value#728

Closed
jonahgraham wants to merge 1 commit into
eclipse-lsp4j:mainfrom
jonahgraham:fixes_721
Closed

Void return types need to always be null value#728
jonahgraham wants to merge 1 commit into
eclipse-lsp4j:mainfrom
jonahgraham:fixes_721

Conversation

@jonahgraham

Copy link
Copy Markdown
Contributor

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

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
@jonahgraham

Copy link
Copy Markdown
Contributor Author

@mickaelistria @sebthom I would appreciate your input/review on this PR.

@mickaelistria

Copy link
Copy Markdown
Contributor

I tried it with vscode-js-debug dapDebugAdapter and it now works (while previously I had to tweak the debug adapter).

@jonahgraham

Copy link
Copy Markdown
Contributor Author

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.

@sebthom

sebthom commented May 3, 2023

Copy link
Copy Markdown
Contributor

@jonahgraham could you provide an update site to try like last time? https://download.eclipse.org/lsp4j/builds/jonah/dap_return_void/

@cdietrich

Copy link
Copy Markdown
Contributor

@eclipse-lsp4j-bot run tests

@cdietrich

Copy link
Copy Markdown
Contributor

@jonahgraham as we dont build prs at
https://ci.eclipse.org/lsp4j/job/lsp4j-multi-build/
anymore we dont seem to have easily consumable repos

@jonahgraham

Copy link
Copy Markdown
Contributor Author

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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configurationDone signature incorrectly says "Void"

4 participants