typetools / typetools/checker-framework
Make an existing annotation indicate a field is set/injected; existing annotation acts like @SuppressWarnings
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Many injection framework allows to create class fields which will be initialized later.
Now I use @SuppressWarnings("initialization.fields.uninitialized") for all this fields to prevent CF error.
It would be nice to have some annotation which tell CF that field will be initialized later
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@AnnotatedFieldWillBeInjectedAtRuntime // <-------------------
public @interface MyInject {}
And any fields annotated using MyInject will not produce "initialization.fields.uninitialized" error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the handling for "initialization.fields.uninitialized" and how annotations on fields and annotation declarations are interpreted. Define how an annotation such as MyInject should suppress that error, then add coverage for a runtime-injected field and its meta-annotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100