Adds @SideEffecFree annotation to FileInputStream(String) and FileInputStream(File).#280
Conversation
📝 WalkthroughWalkthroughFileInputStream receives 🚥 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 `@src/java.base/share/classes/java/io/FileInputStream.java`:
- Around line 115-118: The constructors FileInputStream(File) and
FileInputStream(String) are incorrectly annotated `@SideEffectFree`; remove the
`@SideEffectFree` annotation from both constructors (the public
FileInputStream(File) and the public FileInputStream(String) delegating
constructor) so their actual side effects (permission checks, native open,
cleanup registration) are not misrepresented; also remove the now-unused import
for `@SideEffectFree` if it becomes unused after these deletions.
🪄 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: 2d106e46-311d-43de-b06a-a16af246a8de
📒 Files selected for processing (1)
src/java.base/share/classes/java/io/FileInputStream.java
This is part of CF PR: typetools/checker-framework#7050