SwingTerminal.dispose() is currently public, but it should not be part of the public API. Users should use Terminal.close() instead, which properly handles all cleanup.
Having dispose() public leads to confusion and potential double-close patterns (e.g., calling both dispose() and close()), as seen in SwingTerminalEncodingTest.
Proposed action:
- Deprecate
dispose() in the next minor release
- Make it package-private or remove it in the next major release
- Ensure
close() delegates to dispose() internally so behavior is preserved
Found during review of #1794.
Claude Code on behalf of Guillaume Nodet
SwingTerminal.dispose()is currentlypublic, but it should not be part of the public API. Users should useTerminal.close()instead, which properly handles all cleanup.Having
dispose()public leads to confusion and potential double-close patterns (e.g., calling bothdispose()andclose()), as seen inSwingTerminalEncodingTest.Proposed action:
dispose()in the next minor releaseclose()delegates todispose()internally so behavior is preservedFound during review of #1794.
Claude Code on behalf of Guillaume Nodet