Skip to content

Conversation

@mattn
Copy link
Contributor

@mattn mattn commented Oct 18, 2021

YAY
image

Pair<Editor, PsiFile> p =
MoreWriteActions.computeAndWaitForDocument(
() -> {
;
Copy link
Owner

Choose a reason for hiding this comment

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

Remove this.

MoreWriteActions.computeAndWaitForDocument(
() -> {
;
String path = null;
Copy link
Owner

Choose a reason for hiding this comment

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

= null is not needed because the path is always initialized (or bail out by throwing an exception). Keep this uninitialized unless the default initialized value makes sense for all cases. Usage of uninitialized variables is easy to detect, vs initializing with a wrong value is not.

this.diagnosticsProducer = diagnosticsProducer;
}

@Nullable
Copy link
Owner

Choose a reason for hiding this comment

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

Now looking at the code, we don't use this method at all. Let's delete this getByPath

@draftcode draftcode merged commit 70084eb into draftcode:lsp Oct 19, 2021
@mattn
Copy link
Contributor Author

mattn commented Nov 21, 2021

Sorry, I missed the notification about this. & Thank you.

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