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 "not null" annotations to KiwiResources#verifyExistence methods #1167

Closed
sleberknight opened this issue Jul 22, 2024 · 0 comments · Fixed by #1181
Closed

Add "not null" annotations to KiwiResources#verifyExistence methods #1167

sleberknight opened this issue Jul 22, 2024 · 0 comments · Fixed by #1181
Assignees
Labels
enhancement A request for change or improvement to an existing feature
Milestone

Comments

@sleberknight
Copy link
Member

sleberknight commented Jul 22, 2024

Add an annotation to each (non-void) verifyExistence method in KiwiResources to tell callers and static code analysis tools that they should never return null.

This means we should add a direct dependency (possible with provided scope) on the annotation library. Since kiwi already is using Checker's @NonNull and @Nullable annotations, we should use @NonNull and avoid adding another dependency.

@sleberknight sleberknight changed the title Add "not nullanno Add "not null" annotations to KiwiResources#verifyExistence methods Jul 22, 2024
@sleberknight sleberknight added the enhancement A request for change or improvement to an existing feature label Jul 22, 2024
@sleberknight sleberknight added this to the 4.3.0 milestone Jul 22, 2024
@sleberknight sleberknight self-assigned this Aug 9, 2024
sleberknight added a commit that referenced this issue Aug 9, 2024
Make it clear to all code analysis tools that the return value
of the verifyExistence methods that accept an Optional can
never return null; they either return a value or throw an exception.

Closes #1167
sleberknight added a commit that referenced this issue Aug 9, 2024
…1181)

Make it clear to all code analysis tools that the return value of the
verifyExistence methods that accept an Optional can never return null;
they either return a value or throw an exception.

Closes #1167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request for change or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant