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

Fix non-JSON generators (regression in 7.0) #930

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

philsttr
Copy link
Collaborator

@philsttr philsttr commented Feb 4, 2023

non-JSON generators were broken in 7.0 when a call to generator.setRootValueSeparator was introduced. The non-JSON generators throw UnsupportedOperationException when setRootValueSeparator is invoked.

Handle the UnsupportedOperationException properly.

Also moved disabling the FLUSH_PASSED_TO_STREAM generator feature to prior to decoration, because the YAML generation needs this feature enabled to work properly.

Introduced basic tests for non-JSON generators to catch the above problems in the future.

Fixes #919

non-JSON generators were broken in 7.0 when a call to generator.setRootValueSeparator was introduced.  The non-JSON generators throw UnsupportedOperationException when setRootValueSeparator is invoked.

Handle the UnsupportedOperationException properly.

Also moved disabling the FLUSH_PASSED_TO_STREAM generator feature to prior to decoration, because the YAML generation needs this feature enabled to work properly.

Introduced basic tests for non-JSON generators to catch the above problems in the future.

Fixes #919
@philsttr philsttr requested a review from brenuart February 4, 2023 14:08
@philsttr philsttr added this to the 7.3 milestone Feb 4, 2023
Copy link
Collaborator

@brenuart brenuart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@philsttr philsttr merged commit c9ab293 into main Feb 6, 2023
@philsttr philsttr deleted the fix_non_json_generators branch February 6, 2023 08:19
@philsttr philsttr changed the title Fix non-JSON generators Fix non-JSON generators (regression in 7.0) Feb 20, 2023
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.

Decorator YamlJsonFactoryDecorator and others changing output format does not seem to work
2 participants