Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensures the Ion 1.1 managed writer does not close its OutputStream twice. #940

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Sep 19, 2024

Description of changes:

Before this change, the Ion 1.1 managed text writer would close its OutputStream twice: once when closing its system-level raw writer and once when closing its user-level raw writer. This was not caught by tests because they used ByteArrayOutputStream, whose close() implementation does nothing. Other OutputStreams like FileOutputStream do not tolerate being written to (in this case, by the user-level raw writer) after close.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@popematt popematt merged commit 822f572 into ion-11-encoding Sep 20, 2024
17 checks passed
@tgregg tgregg deleted the ion-11-close-once branch September 20, 2024 17:35
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