Conversation
The method name, its Javadoc, and its only caller all expect the checker name, but the body returned the message key instead. As a result, a @SuppressWarnings with a message key, such as @SuppressWarnings("nullness:assignment"), suppressed nothing, so RemoveAnnotationsForInference removed annotations that it should have retained. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: typetools/checker-framework/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Change: Bug fix 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
RemoveAnnotationsForInference.checkerNameis documented (by its name, its Javadoc summary, and its@returnclause) to return the part of a@SuppressWarningsstring before the colon, but its body returneds.substring(colonPos + 1), the part after the colon.Its only caller,
suppresses, compares the result against the parts of the annotation's fully-qualified name and against"allcheckers". So@SuppressWarnings("nullness:assignment")yielded"assignment", which never matches any part oforg.checkerframework.checker.nullness.qual.NonNull, and@SuppressWarnings("allcheckers:purity")yielded"purity", which does not match"allcheckers". The effect was that annotations under the scope of a@SuppressWarningswith a message key were removed, even thoughisSuppressedexists to retain them.Also adds
RemoveAnnotationsForInferenceTest, which testssuppressesfor suppression strings with and without a message key. Three of its five tests fail before this change.🤖 Generated with Claude Code