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

Module-level @NotNullByDefault #113

Open
CC007 opened this issue Oct 9, 2024 · 1 comment
Open

Module-level @NotNullByDefault #113

CC007 opened this issue Oct 9, 2024 · 1 comment

Comments

@CC007
Copy link

CC007 commented Oct 9, 2024

In July the @NotNullByDefault annotation was added. This annotation can be used with target TYPE and PACKAGE, but sometimes you would want to have your fields, parameters and return types in (almost) every package in your module be default not null.

Therefore I propose to add the MODULE element type to the target annotation
So: @Target(value={TYPE,PACKAGE,MODULE}) instead of @Target(value={TYPE,PACKAGE})

This would also require changes in any annotation processor, IDE or language server that acts on the @NotNullByDefault. I don't know to what extent that is part of this repo.

@CC007
Copy link
Author

CC007 commented Oct 9, 2024

This issue was made in response to the comments on #18

Maybe one day the @NotNullByDefault annotation could be expanded with a boolean applyToSubPackages parameter.

This is not a good idea. [...] This problem should be solved with module-level annotation.

@CC007 CC007 changed the title Module targeted @NotNullByDefault Module-level @NotNullByDefault Oct 9, 2024
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

No branches or pull requests

1 participant