-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix StaxEventItemWriter resource switching within a transaction #5177
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 StaxEventItemWriter resource switching within a transaction #5177
Conversation
a684ec6 to
9442a4e
Compare
Signed-off-by: banseok1216 <bansuk1216@naver.com>
9442a4e to
4515a10
Compare
|
Thank you for the PR! I am just wondering, have you tried to make Probably this is not possible (due to previous design considerations which I need to check), in which case we can proceed with this PR which looks good to me. |
|
Thanks for the suggestion! I did consider making I initially tried to bring the implementations closer, but the changes quickly grew in scope. Given the potential side effects and compatibility concerns, I chose to keep this PR narrowly focused on fixing the immediate issue. 😅 |
|
Thank you for your feedback. That makes sense! I will proceed with merging this PR for now and we can improve things if possible in a later iteration. |
|
LGTM 👍 Rebased and merged as 5dc40a6. Thanks again for looking into this and for contributing a fix! |
| * @throws XMLStreamException thrown if error occurs. | ||
| */ | ||
| @SuppressWarnings("DataFlowIssue") | ||
| protected void endDocument(XMLEventWriter writer) throws XMLStreamException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of this protected method is a breaking change. I have a custom StaxEventItemWriter subclass that overrides this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, thank you for reporting this. I seem to have missed that when I reviewed the PR. I will reinstate that method in 6.0.3, see #5260.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpraet @fmbenhassine I fixed this in #5261 — my mistake 😭
Closes #5176