Module-level `@NotNullByDefault`

Open
#113 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
tooling

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Kotlin
Stars
464
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JetBrains/java-annotations

All issues in JetBrains/java-annotations

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.