Skip to content

Commit

Permalink
fix spotbugs warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Trias committed Apr 29, 2021
1 parent c05c7ab commit d8b950d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Result charTyped(char c, Project project, @NotNull Editor editor, @NotNul
}

@Override
public @NotNull Result checkAutoPopup(char charTyped, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
public Result checkAutoPopup(char charTyped, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
if (!FileUtils.isFileSupported(file.getVirtualFile())) {
return Result.CONTINUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,9 @@ public boolean isAvailable(@NotNull Project project) {
}

@Override
public @NotNull
public
StatusBarWidget createWidget(@NotNull Project project) {
if (widgetForProject.containsKey(project)) {
return widgetForProject.get(project);
}
LSPServerStatusWidget widget = new LSPServerStatusWidget(project);

widgetForProject.put(project, widget);
return widget;
return widgetForProject.computeIfAbsent(project, (k) -> new LSPServerStatusWidget(project));
}

@Override
Expand Down

0 comments on commit d8b950d

Please sign in to comment.