Closed vmi closed 7 months ago
Could you provide a test case?
I have no test cases. I will make it if necessary, but please give me some time.
This looks correct, but I agree with @pjfanning that it'd be really useful to have a test case to show the fix.
We can also backport the fix into 2.16 for 2.16.1, I think. I can cherry-pick merge unless you want to re-base (not sure if Github UI has a good way to do that).
@vmi One other process thing: since this is your first (but hopefully not last! :) ) contribution, I think we will need CLA from:
https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf
and it's usually easiest to fill, sign, print & scan/photo, email to cla
at fasterxml dot com.
This only needs to be done once, before the first contribution and is good for all other contributions.
Apologies for this extra step but it is something we need as OSS project used by corporations.
Thank you again for contributing this -- looking forward to merging it!
I added unit test, and sent signed CLA.
Excellent! CLA successfully received, test looks good; will merge after CI passes.
Since this seems like a safe fix, I backported it in 2.16.1 as well so will get released sooner (we only just started 2.17 branch).
In serializeFields() of XmlBeanSerializerBase, setNextIsUnwrapped(true) is executed in L.200-203, and setNextIsUnwrapped(false) is executed in L.215-219. However, in serializeFieldsFiltered(), setNextIsUnwrapped(true) is executed in L.282-285, but there is no corresponding setNextIsUnwrapped(false).