Skip to content

Update CentOS launch script tests so that yum does not attempt to use http #26246

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

Closed
wilkinsona opened this issue Apr 27, 2021 · 0 comments
Closed
Labels
status: forward-port An issue tracking the forward-port of a change made in an earlier branch type: task A general task
Milestone

Comments

@wilkinsona
Copy link
Member

Forward port of issue #26245 to 2.5.x.

@wilkinsona wilkinsona added status: forward-port An issue tracking the forward-port of a change made in an earlier branch type: task A general task labels Apr 27, 2021
@wilkinsona wilkinsona added this to the 2.5.0 milestone Apr 27, 2021
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
Prior to this commit, a change introduced in spring-projectsgh-25910 would close the
`JsonGenerator` after it's been used for JSON serialization. This would
not only close it and recycle resources, but also flush the underlyning
buffer to the output.
In a case where the JSON serialization process would throw an exception,
the buffer would be still flushed to the response output. Before the
change introduced in spring-projectsgh-25910, the response body could be still empty at
that point and error handling could write an error body instead.

This commits only closes the `JsonGenerator` when serialization has been
successful.

Note that we're changing this in the spirit of backwards compatibility
in the 5.2.x line, but change this won't be merged forward on the 5.3.x
line, for several reasons:

* this behavior is not consistent. If the JSON output exceeds a
certain size, or if Jackson has been configured to flush after each
write, the response output might still contain an incomplete JSON
payload (just like before this change)

* this behavior is not consistent with the WebFlux and Messaging codecs,
which are flushing or closing the generator

* not closing the generator for error cases prevents resources from
being recycled as expected by Jackson

Fixes spring-projectsgh-26246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: forward-port An issue tracking the forward-port of a change made in an earlier branch type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant