Skip to content

Use JSpecify for API nullability annotations #207

Description

@sciwhiz12

JSpecify is a set of annotation types, built by a varied group of organizations with the aim of making a common set of annotations that can be used by everyone with a standard specified set of semantics.

The most notable annotations provided by JSpecify are its nullability annotations: @Nullable, @NonNull, and @NullMarked.

More projects are moving to adopt JSpecify (either anew or replacing other annotations), such as Spring Framework in its 7.0 release. The benefit is that there's a single set of annotations that everyone can depend on, rather than being fragmented across multiple different sets (JetBrains annotations, Google's error-prone annotations, Checker Framework's annotations, the legacy JSR305 annotations, and so on). It is already supported by various tools and IDEs, including IntelliJ IDEA.

It would be useful for the NightConfig API (and even internals!) to use JSpecify annotations to specify nullability, to benefit both developers in using the API and the static checkers in ensuring that nulls are properly accounted for.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions