Conversation
WalkthroughAdds per-method type-variable nullable-upper-bound support to library models and wires it through nullability checks. Introduces LibraryModels.methodTypeVariablesWithNullableUpperBounds(), implements it in DefaultLibraryModels and CombinedLibraryModels, and aggregates the data in the combined model. Renames the class-level hook onOverrideTypeParameterUpperBound → onOverrideClassTypeVariableUpperBound and adds onOverrideMethodTypeVariableUpperBound to Handler/handlers/LibraryModelsHandler/CompositeHandler/BaseNoOpHandler. ConstraintSolverImpl and GenericsChecks now consult the new method-level and renamed class-level override hooks. Tests and a library helper method were added to exercise the new behavior. Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-08-28T04:54:20.953ZApplied to files:
📚 Learning: 2025-10-29T23:56:18.236ZApplied to files:
📚 Learning: 2025-08-14T18:50:06.159ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1345 +/- ##
============================================
- Coverage 88.41% 88.40% -0.01%
- Complexity 2582 2592 +10
============================================
Files 97 97
Lines 8664 8701 +37
Branches 1722 1731 +9
============================================
+ Hits 7660 7692 +32
- Misses 504 505 +1
- Partials 500 504 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #1157 Leverages recent new functionality in `LibraryModels` (#1407, #1345) to properly support inference for calls to the `AtomicReferenceFieldUpdater::newUpdater` generic method. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Improvements** * Enhanced null-safety analysis for AtomicReferenceFieldUpdater to properly support nullable type variable upper bounds and nested annotations for generic method parameters. * **Tests** * Added test coverage for AtomicReferenceFieldUpdater functionality within JDK library integration and null-marked code scenarios. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
We need this support to address #1157 (which I'll do in a follow-up PR). Now
LibraryModelscan mark the upper bound of some method type variable as@Nullable. Rename method inLibraryModelsfor getting upper bounds of class type variables for clarity.Summary by CodeRabbit
New Features
Tests