Skip to content

Commit

Permalink
refactor: remove duplicate null check
Browse files Browse the repository at this point in the history
Remove a duplicated null check (already checked at the very beginning of
the method)
  • Loading branch information
rubenporras authored and sebthom committed Aug 27, 2024
1 parent 1064aa6 commit 3ce232f
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@ public void run(IMarker marker) {
}
}
if (wrapper != null) {
if (codeAction.getEdit() == null) {
if (CodeActionCompletionProposal.isCodeActionResolveSupported(wrapper.getServerCapabilities())) {
CodeAction resolvedCodeAction = wrapper.execute(ls -> ls.getTextDocumentService().resolveCodeAction(codeAction)).get(2, TimeUnit.SECONDS);
if (resolvedCodeAction != null) {
codeAction = resolvedCodeAction;
}
if (CodeActionCompletionProposal.isCodeActionResolveSupported(wrapper.getServerCapabilities())) {
CodeAction resolvedCodeAction = wrapper.execute(ls -> ls.getTextDocumentService().resolveCodeAction(codeAction)).get(2, TimeUnit.SECONDS);
if (resolvedCodeAction != null) {
codeAction = resolvedCodeAction;
}
}
if (codeAction.getEdit() != null) {
Expand Down

0 comments on commit 3ce232f

Please sign in to comment.