Contract checking does not check for proper overriding
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 370
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 68
Description
Our checking of @Contract annotations (which is off by default) does not check for correct method overriding. So, if a supertype method has a particular @Contract, we do not check that overriding methods adhere to the @Contract, which could lead to missed NPE bugs. Originally discussed here.
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
Start by reading the @Contract checking implementation and the discussion linked in the issue, then trace how method overriding is currently analyzed. Identify the relevant tests for contract checking and add coverage showing that overriding methods must adhere to a supertype method's @Contract. Done means invalid overrides are reported and valid overrides continue to pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100