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

Allow IonWriters to be reused. #190

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

zslayton
Copy link
Contributor

This PR addresses #189.

Changes:

  • Bumps ion-java dependency from 1.4.0 to 1.5.1 (latest stable release)
  • Adds boolean _ionWriterIsManaged field to the IonGenerator class, allowing it to track whether the provided IonWriter should be closed when the IonGenerator is closed.
  • Modifies the IonFactory to specify whether the IonWriter it is providing to new IonGenerator instances was just created (ionWriterIsManaged=true) or if it was provided by the user (ionWriterIsManaged=false).
  • Adds unit tests showing that the same instance of IonWriter can be reused for multiple calls to IonObjectMapper#writeValue(IonWriter, Object).

@cowtowncoder cowtowncoder added this to the 2.10.0 milestone Dec 17, 2019
@cowtowncoder cowtowncoder merged commit 5f4ec0e into FasterXML:2.10 Dec 17, 2019
@zslayton zslayton deleted the reuse-ion-writer branch December 18, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants