Skip to content

Switch to JSpecify for nullability annotations#12

Merged
onebeastchris merged 2 commits into
GeyserMC:masterfrom
eclipseisoffline:jspecify
Apr 21, 2026
Merged

Switch to JSpecify for nullability annotations#12
onebeastchris merged 2 commits into
GeyserMC:masterfrom
eclipseisoffline:jspecify

Conversation

@eclipseisoffline
Copy link
Copy Markdown
Member

This PR switches to JSpecify for nullability annotations in the API module. All packages in the API now have a package-info.java file with a @NullMarked annotation, which applies to all types in the package. This includes but is not limited to method return values, parameters, fields, generic type parameters, arrays, and more.

Because of this change, all @NonNull annotations have been removed, as they are no longer necessary. All @Nullable annotations have been replaced by JSpecify's, and those on a separate line have been moved to be in-line, as per JSpecify's standard.

Also see Geyser#6303.

The minor version has been bumped.

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