Skip to content

[CQ] introduce null-safe OpenApi wrappers #8139

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pq
Copy link
Contributor

@pq pq commented Apr 30, 2025

Currently there are a number of common platform accesses that are not safe, prone to runtime exceptions and spam the inspection log with nullability warnings. This change introduces a host of wrappers around common IntelliJ Open API calls that introduce null-safety, reducing NPE risk, quieting 86 "Nullability and data flow problems" inspections.

Specifically, this change introduces and migrates calls to new OpenApiUtils utility methods:

  • safeRunWriteAction
  • safeInvokeAndWait
  • safeInvokeLater
  • getModules
  • getLibraryTable
  • getContentRoots

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

@pq pq marked this pull request as draft April 30, 2025 17:09
@pq pq marked this pull request as ready for review April 30, 2025 17:38
@pq pq requested review from helin24 and jwren April 30, 2025 17:38
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