GH-1212 Replace JetBrains nullability annotations with JSpecify#1288
GH-1212 Replace JetBrains nullability annotations with JSpecify#1288
Conversation
There was a problem hiding this comment.
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.
...e-core/src/main/java/com/eternalcode/core/bridge/placeholderapi/PlaceholderApiExtension.java
Outdated
Show resolved
Hide resolved
…ceholderapi/PlaceholderApiExtension.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
noyzys
left a comment
There was a problem hiding this comment.
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.
Dlatego trzeba iść drogą hybrydową |
...e-core/src/main/java/com/eternalcode/core/bridge/placeholderapi/PlaceholderApiExtension.java
Show resolved
Hide resolved
eternalcore-core/src/main/java/com/eternalcode/core/delay/InstantExpiry.java
Outdated
Show resolved
Hide resolved
...re-core/src/main/java/com/eternalcode/core/feature/adminchat/AdminChatChannelController.java
Outdated
Show resolved
Hide resolved
...re-core/src/main/java/com/eternalcode/core/feature/adminchat/AdminChatChannelController.java
Outdated
Show resolved
Hide resolved
...re-core/src/main/java/com/eternalcode/core/feature/adminchat/AdminChatChannelController.java
Outdated
Show resolved
Hide resolved
eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/AdminChatCommand.java
Outdated
Show resolved
Hide resolved
eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/AdminChatCommand.java
Outdated
Show resolved
Hide resolved
| NoticeService noticeService, | ||
| Notice message, | ||
| List<String> commands |
There was a problem hiding this comment.
| NoticeService noticeService, | |
| Notice message, | |
| List<String> commands | |
| @NonNull NoticeService noticeService, | |
| @NonNull Notice message, | |
| @NonNull List<String> commands |
Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
Co-authored-by: DMK <81445555+imDMK@users.noreply.github.com>
CitralFlo
left a comment
There was a problem hiding this comment.
I checked services and annotated more - Nullable elements are not marked in your code.
Additionally inside code i added jetbrains annotation for better intelliJ usage - current screems when @NullMarked is used.
All Api methods should use jspecific
Review in pull request form: #1293
* My understanding of JSpecify for api - mostly used in Java-Kotlin communication. With NullMarked as clear way to display notnull by default. Nullmarks checked to second layer of services. Additional `NotNull` s from jetbrains required by intelliJ to not screen about parameter marks as notNull * Additional marks * Use global @NullMarked defined at package-info.java * Update eternalcore-api/src/main/java/com/eternalcode/core/feature/catboy/CatboyService.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update eternalcore-api/src/main/java/com/eternalcode/core/feature/adminchat/event/AdminChatEvent.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update eternalcore-api/src/main/java/com/eternalcode/core/feature/jail/JailService.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpServiceImpl.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Remove unnecessary annotations * Update eternalcore-api/src/main/java/com/eternalcode/core/feature/spawn/SpawnService.java * Update eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/SpawnServiceImpl.java * Update eternalcore-api/src/main/java/com/eternalcode/core/EternalCoreApiProvider.java * Update eternalcore-api/src/main/java/com/eternalcode/core/EternalCoreApiProvider.java * Update eternalcore-api/src/main/java/com/eternalcode/core/EternalCoreApiProvider.java * Update eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/event/PreWarpTeleportEvent.java * Minor touchups * Add @ApiStatus.Internal annotation to deinitialize() method --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Jakub Kędziora <77227023+Jakubk15@users.noreply.github.com>
This PR replaces nullability annotations from JetBrains with the ones from JSpecify.
Resolves #1212