Skip to content

Conversation

@Jakubk15
Copy link
Member

This PR replaces nullability annotations from JetBrains with the ones from JSpecify.

Resolves #1212

@Jakubk15 Jakubk15 requested a review from a team as a code owner January 31, 2026 14:35
@Jakubk15 Jakubk15 changed the title Replace JetBrains annotations with JSpecify annotations for nullability GH-1212 Replace JetBrains annotations with JSpecify annotations for nullability Jan 31, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully replaces JetBrains nullability annotations with JSpecify annotations across the project. The changes are thorough and consistent. I've added one suggestion to improve annotation correctness in one of the files, making the nullability contract more precise. Overall, this is a great refactoring that improves code standardization.

…ceholderapi/PlaceholderApiExtension.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Member

@noyzys noyzys left a comment

Choose a reason for hiding this comment

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

Trzeba też pamiętać jedno mieszanie adnotacji JetBrains i JSpecify mogłoby utrudnić interpretację kontraktów nullability, dlatego intencją jest pełne przejście na JSpecify w całym projekcie co za tym idzie zmiany w codebse.

Migracja do JSpecify jest celowa - chodzi o spójny, specyfikacyjny model nullability pseudo nullsafety i unikanie mieszania różnych frameworków adnotacji.
Twoja sugestia faktycznie poprawia precyzję kontraktu, więc ja daję approve aczkolwiek nie spamował bym tym na dużą skale.

@noyzys
Copy link
Member

noyzys commented Feb 2, 2026

@noyzys Problem w tym, że JSpecify posiada tylko adnotację dotyczące nullability, a nie posiada takich rzeczy jak chociażby @ApiStatus, czy @Unmodifiable

Dlatego trzeba iść drogą hybrydową

Comment on lines 23 to 25
NoticeService noticeService,
Notice message,
List<String> commands
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
NoticeService noticeService,
Notice message,
List<String> commands
@NonNull NoticeService noticeService,
@NonNull Notice message,
@NonNull List<String> commands

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.

Migrate to JSpecify annotations

4 participants