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

Fix missing synthesis options during LSP initialization throws a NullPointerException #83

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

christoph-fricke
Copy link
Contributor

During the LSP initialization process a client is able to specify persisted synthesis options. If no synthesis options are provided, the server currently throws (and catches) a NullPointerException "Could not load client-side synthesis options" and continues to generates a diagram with default synthesis options anyway.
However, a client is not always able to provide synthesis options, which makes the exception slightly irritating in such situations. For example, a KEITH Theia ide that is used for the first time or has cleared localStorage does not have persisted options.

This PR prevents the NullPointException by using an empty synthesisOptions object if necessary.

Language server no longer throws a NullPointerException if a client does not specify synthesis options during lsp initialization.
@NiklasRentzCAU NiklasRentzCAU self-requested a review May 10, 2021 12:08
Copy link
Member

@NiklasRentzCAU NiklasRentzCAU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NiklasRentzCAU NiklasRentzCAU merged commit 6ae62d9 into kieler:master Jun 2, 2021
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.

2 participants