Skip to content

fix: use null-safe CompletableFutures.awaitWithCheckCanceled wrapper to prevent NPE when future is null - #1663

Merged
angelozerr merged 1 commit into
redhat-developer:mainfrom
angelozerr:await_future_null
Sep 4, 2026
Merged

fix: use null-safe CompletableFutures.awaitWithCheckCanceled wrapper to prevent NPE when future is null#1663
angelozerr merged 1 commit into
redhat-developer:mainfrom
angelozerr:await_future_null

Conversation

@angelozerr

Copy link
Copy Markdown
Contributor

fix: use null-safe CompletableFutures.awaitWithCheckCanceled wrapper to prevent NPE when future is null

AbstractLSPFeatureSupport.getFeatureData() can return null due to a race condition with cancel(). All callers passing the result to ProgressIndicatorUtils.awaitWithCheckCanceled would throw IllegalArgumentException on the @NotNull parameter.

prevent NPE when future is null

AbstractLSPFeatureSupport.getFeatureData() can return null due to a race
condition with cancel(). All callers passing the result to
ProgressIndicatorUtils.awaitWithCheckCanceled would throw
IllegalArgumentException on the @NotNull parameter.

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr added this to the 0.21.1 milestone Sep 4, 2026
@angelozerr angelozerr self-assigned this Sep 4, 2026
@angelozerr angelozerr added the bug Something isn't working label Sep 4, 2026
@angelozerr angelozerr moved this to In Progress in Java Tooling Sep 4, 2026
@angelozerr
angelozerr merged commit 2a5d042 into redhat-developer:main Sep 4, 2026
5 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Java Tooling Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant