Skip to content

Add JSpecify nullability annotations to DataFetcherResult #3891

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

dondonz
Copy link
Member

@dondonz dondonz commented Apr 4, 2025

I made a classic NPE mistake because I forgot to check if data was null while writing a DataFetcher

With JSpecify, we can detect NPEs like this at compile time rather than run time.

Have a look at the documentation for @NullMarked https://jspecify.dev/docs/user-guide/#nullmarked

This is the first PR to add JSpecify to an existing class so let's have a discussion.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Test Results

  313 files    313 suites   50s ⏱️
3 586 tests 3 581 ✅ 5 💤 0 ❌
3 675 runs  3 670 ✅ 5 💤 0 ❌

Results for commit f962466.

Copy link
Member

@andimarek andimarek left a comment

Choose a reason for hiding this comment

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

Exactly what we should do incrementally.

@dondonz dondonz merged commit 6afaab5 into master Apr 8, 2025
2 checks passed
@dondonz dondonz deleted the datafetcherresult-nullability branch April 8, 2025 01:10
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