Small cleanups#7725
Conversation
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java`:
- Around line 1054-1063: The method updateObligationsForOwningReturn currently
assumes ReturnNode#getResult() is non-null and suppresses nullness, which can
cause an NPE for bare returns; update this by fetching the result via
ReturnNode#getResult(), check for null and return early (or skip processing) if
it is null, then call getTempVarOrNode(returnExpr) and proceed with existing
logic (removing obligations via removeObligationsContainingVar) only when
returnExpr is non-null; reference ReturnNode#getResult, getTempVarOrNode,
updateObligationsForOwningReturn (and mirror the null-check approach used in
LiveVarTransfer/BusyExprTransfer).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 946f2323-11eb-4ce2-a5cf-174cc3a1f74c
📒 Files selected for processing (1)
checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java
No description provided.