uber / uber/NullAway

Extend `@Contract` support to handle fields

Open
#134 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.1k
Forks
370
Avg merge
1d 13h
Merged PRs (30d)
68

Description

In #129 we added (some) support for JetBrains @Contract annotations. We should somehow extend this support to fields, e.g., to handle the example in this comment. This will require going beyond what is expressible with standard @Contract annotations though and will likely require introducing our own annotation.

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.

Research direction

Start by reading the existing JetBrains @Contract support from issue #129 and the example in the linked NullAway issue #96 comment. Determine how field contracts should be represented beyond standard @Contract annotations, then define completion as field contracts being recognized and the example behavior being handled.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.