Skip to content

Lock Checker: document why @SideEffectsOnly is not a SideEffectAnnotation - #7971

Merged
smillst merged 1 commit into
typetools:masterfrom
mernst:side-effects-only-2-7-split-2
Aug 13, 2026
Merged

smillst merged 1 commit into
typetools:masterfrom
mernst:side-effects-only-2-7-split-2

Conversation

@mernst

@mernst mernst commented Aug 12, 2026

Copy link
Copy Markdown
Member

@SideEffectsOnly constrains which expressions a method modifies, but it promises nothing about acquiring or releasing locks, so a @SideEffectsOnly method gets the same locking guarantee as an unannotated one.

…tion

@SideEffectsOnly constrains which expressions a method modifies, but it
promises nothing about acquiring or releasing locks, so a @SideEffectsOnly
method gets the same locking guarantee as an unannotated one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bf168827-e220-407b-bce4-2eb1cb0d1158

📥 Commits

Reviewing files that changed from the base of the PR and between f304841 and 186512f.

📒 Files selected for processing (2)
  • checker/src/main/java/org/checkerframework/checker/lock/LockAnnotatedTypeFactory.java
  • checker/tests/lock/SideEffectsOnlyLock.java

📝 Walkthrough

Walkthrough

The lock checker documentation now states that @SideEffectsOnly provides no lock acquisition or release guarantee. A new test verifies this behavior with annotated calls and a synchronized field-mutating method.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@smillst
smillst merged commit 6eef0ba into typetools:master Aug 13, 2026
60 of 63 checks passed
@smillst
smillst deleted the side-effects-only-2-7-split-2 branch August 13, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants