Land the remaining cleanup from PR #5: drop leftover duplicate input.close() calls#174
Merged
Merged
Conversation
PR #5 (AmityWilder) diagnosed the save-to-opened-file bug and removed these unconditional duplicate closes; the save fix itself later landed via #34, but a subsequent refactor that moved the close ahead of the loadOK check left the original trailing close behind in both command-line load paths. Drop the second close so each Scanner is closed exactly once (closing was a no-op the second time, this is purely cleanup). Co-authored-by: Amy Wilder <henrythepony@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XsCdD8B7xvL4A5VDyDLzWc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Salvages the still-applicable piece of @AmityWilder's #5 onto current master. That PR correctly diagnosed the save-to-opened-file bug back in February; its core fix later landed independently via #34 (
590f124), the improved save-error dialog message arrived with theTellUser/FileAbstractorrefactors, and the Makefile/.gitignore changes were superseded by the Maven + Nix build. The one remnant master still carried was the duplicated unconditionalinput.close()in both command-line load paths ofJLSStart— a later refactor moved the close ahead of theloadOKcheck but left the original trailing close behind. This drops the second close so eachScanneris closed exactly once. Amy is credited as co-author on the commit.Closes #5
Testing
No behavior change to pin — closing an already-closed
Scanneris a no-op, so this is purely cleanup. Full suite run locally on JDK 25:mvn testgreen, 398 tests, 0 failures (2 skipped for missing external HDL toolchains).🤖 Generated with Claude Code
https://claude.ai/code/session_01XsCdD8B7xvL4A5VDyDLzWc
Generated by Claude Code