Remove the fallback that reads type-use annotations from bytecode type attributes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reading the fallback methods and their callers named in NullabilityUtil, then review the JDK compatibility checks added in #1317 and #1794. Determine how standard mode should enforce the required javac support and flag, including whether to warn before requiring it. Done means the fallback is removed and standard-mode users receive the agreed compatibility behavior.
Written by the indexing model from the issue text.
Description
Split out from #1170, item 2.
When a class comes from bytecode, javac without the JDK-8346471 fix does not put type-use annotations on the Symbol, so NullAway reads them from the symbol's raw type attributes instead: NullabilityUtil.hasAnyAnnotationMatchingBackCompat, getAllAnnotationsForParameter, and getTypeUseAnnotations, plus their callers. The fix ships in JDK 17.0.19+ and 21.0.8+ behind -XDaddTypeAnnotationsToSymbol=true, and JDK 22 and later have it without the flag.
JSpecify mode already requires it: since #1317 (0.12.11) NullAway fails in JSpecify mode when javac lacks the fix or the flag is missing, and #1794 (0.14.2) detects whether a JDK 17 or 21 javac supports the flag. Standard mode has no such check and runs without the flag, so it still depends on the fallback.
Deleting the fallback means extending that requirement to standard mode: JDK 22+, or JDK 17.0.19+ / 21.0.8+ with -XDaddTypeAnnotationsToSymbol=true. Standard-mode users who do not pass the flag today would break, so this needs a decision on when to require it, for example a release that warns first.
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 381
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 106
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from uber/NullAway
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
uber/NullAway#2145 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
uber/NullAway#2058 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
uber/NullAway#1899 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
uber/NullAway#2160 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
Similar issues
-
Cleanup: restore the interrupt flag in AiFailureAnalyzerPossibly taken @Rishankgupta08 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seleniumboot/selenium-boot#258 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dense-analysis/ale#5181 ·
-
bug subsystem:agent-harness triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ShaftHQ/SHAFT_ENGINE#8043 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
johanhaleby/occurrent#1505 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day