Skip to content
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

Add nullability annotations to IndexSearcher APIs #14132

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Edarke
Copy link

@Edarke Edarke commented Jan 10, 2025

Annotate public APIs with an internal definition of @Nullable where appropriate.

This proposal is a follow up from the discussion here. This change adds an internal copy of JSpecify's @Nullable to lucene-util and uses Intellij's "infer nullability" feature to automatically apply the annotation to IndexSearcher and its dependencies. If this looks good, there will be a follow up PR to automatically annotate other APIs.

The motivation for this change is to increase the null safety of downstream projects using Lucene by allowing users to configure a javac plugin to lint their build. This change was tested with NullAway, which recognizes any annotation with the simple class name @Nullable

Copy link

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant