typetools / typetools/checker-framework
Fix the Interning Checker to treat autoboxed integer-like values between -128 and 127 as interned
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Currently the Interning Checker is too conservative: it does not know that, when autoboxing integer-like values between -128 and 127, the result is interned. The Constant Value Checker can be used for this purpose to improve the precision of the Interning Checker.
A test case is available at checker/tests/interning/BoxingInterning.java but is currently disabled.
There is also a test at checker/tests/interning/Autoboxing.java that is enabled but could be updated to require higher precision.
See also issue #84.
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 with checker/tests/interning/BoxingInterning.java and re-enable its test case, then compare it with checker/tests/interning/Autoboxing.java. Read how the Constant Value Checker can support the Interning Checker. Done means autoboxed integer-like values from -128 through 127 are recognized as interned and both tests require the improved precision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100