JetBrains / JetBrains/java-annotations
Module-level `@NotNullByDefault`
- 主要语言
- Kotlin
- 星标
- 463
- 派生
- 72
- PR 合并指标
- 30 天内没有已合并 PR
描述
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](https://docs.oracle.com/en/java/javase/21/docs//api/java.base/java/lang/annotation/ElementType.html#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.
贡献指南
调研方向
Start with the @NotNullByDefault annotation declaration and inspect how its current TYPE and PACKAGE targets are handled. Check any annotation processor, IDE, or language-server handling present in the repository, then verify that MODULE is accepted and module-level defaults are processed consistently.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100