Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jakarta quick-fix fails due to getData() is null #336

Closed
turkeylurkey opened this issue Jun 25, 2024 · 3 comments
Closed

Jakarta quick-fix fails due to getData() is null #336

turkeylurkey opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working must-fix
Milestone

Comments

@turkeylurkey
Copy link
Member

turkeylurkey commented Jun 25, 2024

Certain quick fixes related to Jakarta do not appear with the diagnostic in the editor because of an exception.

You can see the exception in the Output tab when you select "Language Support for Java."

[Error - 12:57:13 PM] Request textDocument/codeAction failed.
  Message: Request jakarta/java/codeaction failed with message: java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "org.eclipse.lsp4j.Diagnostic.getData()" is null
  Code: -32603

An example is the quick fix reading "The @AssertTrue annotation can only be used on boolean and Boolean type fields."

More details are available in the lsp4jakarta repository.

@turkeylurkey turkeylurkey added the bug Something isn't working label Jun 25, 2024
@turkeylurkey turkeylurkey changed the title Quick-fix fails due to getData() is null Jakarta quick-fix fails due to getData() is null Jun 25, 2024
@TrevCraw TrevCraw added this to the Next milestone Oct 8, 2024
@TrevCraw TrevCraw moved this from New Issues to Prioritized in Open Liberty Developer Experience Oct 8, 2024
@aparnamichael aparnamichael self-assigned this Oct 9, 2024
@aparnamichael aparnamichael moved this from Prioritized to In Progress in Open Liberty Developer Experience Nov 5, 2024
@aparnamichael
Copy link
Contributor

Raised a PR with fix in lsp4Jakarta repo - eclipse/lsp4jakarta#536

@aparnamichael aparnamichael moved this from In Progress to In Review in Open Liberty Developer Experience Nov 13, 2024
@TrevCraw
Copy link
Contributor

@aparnamichael now that eclipse/lsp4jakarta#536 has been merged, please verify this fix is resolved using the latest LSP4Jakarta 0.2.2-SNAPSHOT build. You will need to manually delete the language server jars and then re-run npm run build. Make sure LSP4Jakarta 0.2.2-SNAPSHOT is specified in all the correct locations. You can refer to #361.

@aparnamichael
Copy link
Contributor

aparnamichael commented Nov 19, 2024

Tested with LSP4Jakarta 0.2.2-SNAPSHOT, the null pointer exception is resolved, and the quick fixes are functioning as expected.

image

@github-project-automation github-project-automation bot moved this from In Review to Sprint Closed in Open Liberty Developer Experience Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working must-fix
Projects
Development

No branches or pull requests

3 participants